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