#include<iostream>
#include<cmath>
using namespace std;

long long vector1();

int main(){
    short T;
    cin>>T;
    long long mass[10];
    for(short i=0;i<T;i++){
        mass[i]=vector1();
    }
    for(short i=0;i<T;i++){
        cout<<mass[i]<<endl;
    }
    return 0;
}

long long vector1(){
    long long x1,y1,x2,y2,a,b;
    cin>>x1>>y1>>x2>>y2>>a>>b;
    return (a-abs(x2-x1)+1)*(b-abs(y2-y1)+1);
}
