#include<bits/stdc++.h>
using namespace std;
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int q;
    vector<int> v;
    cin>>q;
    for(int i=0;i<q;i++){
        int x1, y1, x2, y2, a, b;
        cin>>x1>>y1>>x2>>y2>>a>>b;
        int x3, y3;
        x3=abs(x2-x1);
        y3=abs(y2-y1);
        if(x3>a || y3>b) cout<<0<<endl;
        else cout<<(a-x3+1)*(b-y3+1)<<endl;
    }
    return 0;
}

