#include<bits/stdc++.h>
using namespace std;
long long otg(long long x1,long long y1,long long x2,long long y2,long long a,long long b){
    long long x=x1-x2;
    long long y=y1-y2;
    //cout<<x<<" "<<y<<endl;
    if(x<0){
        x=-x;
    }
    if(y<0){
        y=-y;
    }
    //cout<<x<<" "<<y<<endl;
    long long o=0;
    long long n=a-x+1;
    long long m=b-y+1;
    //cout<<a<<" "<<b<<endl;
    n=max(o,n);
    m=max(o,m);
    //cout<<n<<" "<<m<<endl;
    return n*m;
}
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    long long t,x1,y1,x2,y2,a,b;
    cin>>t;
    for(long long i=0;i<t;i++){
        cin>>x1>>y1>>x2>>y2>>a>>b;
        cout<<otg(x1,y1,x2,y2,a,b)<<endl;
    }




return 0;
}

