#include<bits/stdc++.h>
using namespace std;
int main ()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    long long n;
    cin>>n;
    for(long long i=0;i<n;i++)
    {
        long long x1, y1, x2, y2, a, b;
        cin>>x1>>y1>>x2>>y2>>a>>b;
        long long br=0, br2=0;
        if(x1<0 && x2<0)br+=(x1-x2);
        if(x1>0 && x2>0)br+=(x1-x2);
        else{
           br=x1-x2;
        }
        if(br<0)br=-br;
        if(y1<0 && y2<0)br2+=(y1-y2);
        if(y1>0 && y2>0)br2+=(y1-y2);
        else{
            br2=y1-y2;
        }
        if(br2<0)br2=-br2;
       // cout<<br<<" "<<br2<<endl;
        long long brbr=0;
        if(a<0)a=-a;
        if(b<0)b=-b;
        brbr=(a-br+1)*(b-br2+1);
        cout<<brbr<<endl;

    }
   // cout<<"0"<<endl;
    return 0;
}