#include<bits/stdc++.h>

using namespace std;

int main(){
    long long T;
    cin >> T;
    for(long long i = 0; i < T; i ++){
        long long xA, yA, xB, yB, a, b;
        cin >> xA >> yA >> xB >> yB >> a >> b;
        long long delX, delY;
        delX = xB - xA;
        delY = yB - yA;
        if(b < delY or a < delX){
            cout << 0 << "\n";
            continue;
        }
        cout << (b-delY + 1) * (a - delX + 1) << "\n";
    }
    return 0;
}
