#include<bits/stdc++.h>
using namespace std;

int main(){

int T,x1,y1,x2,y2,a,b;
int answer[10];
int x_dif,y_dif;

cin>>T;
/// Main part
for(int i=0;i<T;i++){
    cin>>x1>>y1>>x2>>y2>>a>>b;
    x_dif=abs(x1-x2);
    y_dif=abs(y1-y2);
    answer[i]=(a+1-x_dif)*(b+1-y_dif);
    if(answer[i]<0)answer[i]=0;
}
for(int i=0;i<T;i++){
    cout<<answer[i]<<endl;

}
return 0;
}
