#include <bits/stdc++.h>
using namespace std;
int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    cout.tie(NULL);
    vector <int> v;
    long long T,x1,x2,y1,y2,a,b,U=0,R=0,komb;
    cin>>T;
    for(int i=0;i<T;i++){
        cin>>x1>>y1>>x2>>y2>>a>>b;
        R=abs(x2-x1);
        U=abs(y2-y1);
        if(R>a){
            v.push_back(0);
            continue;
        }
        if(U>b){
            v.push_back(0);
            continue;
        }
        v.push_back((a-R+1)*(b-U+1));
    }
    for(int i=0;i<T;i++){
        cout<<v[i]<<endl;
    }




    return 0;
}
