#include<iostream>
#include<cmath>
using namespace std;
int main () {
    int t;
    cin>>t;
    long long x1,x2,y1,y2,a,b,shirochina,visochina;
    for(int i=0;i<t;i++){
        cin>>x1>>y1>>x2>>y2>>a>>b;
        shirochina=abs(x1-x2);
        visochina=abs(y1-y2);
        if(a+1>=shirochina and b+1>=visochina){
            cout<<(b+1-visochina)*(a+1-shirochina);
        }else{
            cout<<0;
        }
        cout<<"\n";
    }
    return 0;
}
