#include<bits/stdc++.h>
using namespace std;
long long in[10][6];
int main(){
    int t;
    cin>> t;
    for(int i = 0 ; i < t ; i++){
        for(int j= 0 ; j < 6 ; j++){
            cin>>in[i][j];
        }
    }
    for(int i = 0 ; i <  t ; i++){
        int x1 = in[i][0], x2 = in[i][2],y1 = in[i][1],y2 = in[i][3],a = in[i][4],b = in[i][5];
        int x = abs(x1-x2);
        int y = abs(y1-y2);
        if(a+1 < x || b+1 < y){
            cout<< 0<<endl;
            continue;
        }
        int brx = a-x+1;
        int bry = b-y+1;
        long long ans = brx*bry;
        cout<<ans<<endl;
    }

    return 0;
}
