#include<iostream>
#include<math.h>
using namespace std;
int main(){
    long long  t;
    cin>>t;
    for(long long  k=0;k<t;k++){
        long long  r1,r2,c1,c2;
        cin>>r1>>c1>>r2>>c2;
        long long  a,b;
        cin>>a>>b;
        long long  n=r1-r2;
        long long  m=c1-c2;
        long long  absn=abs(n);
        long long  absm=abs(m);
        if(absn>a){
            cout<<"0"<<endl;
            continue;
        }
        if(absm>b){
            cout<<"0"<<endl;
            continue;
        }
        cout<<(a-absn+1)*(b-absm+1)<<endl;


    }

}


