#include<iostream>
#include<math.h>
using namespace std;
int main(){
    int t;
    cin>>t;
    for(int k=0;k<t;k++){
        int r1,r2,c1,c2;
        cin>>r1>>c1>>r2>>c2;
        int a,b;
        cin>>a>>b;
        int n=r1-r2;
        int m=c1-c2;
        int absn=abs(n);
        int 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;


    }

}


