#include<bits/stdc++.h>
#define endl "\n"
using namespace std;
int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin>>t;
    for(int tests=0;tests<t;tests++){
        long long x1,y1,x2,y2,a,b;
        cin>>x1>>y1>>x2>>y2>>a>>b;
        long long x=abs(x1-x2),y=abs(y1-y2);
        long long ans=(a-x+1)*(b-y+1);
        if(ans<0){
            cout<<0;
        }else{
            cout<<ans;
        }
        cout<<endl;
    }
    return 0;
}
