#include<bits/stdc++.h>

using namespace std;

int main(){
    int T;
    cin >> T;
    for(int i = 0; i < T; i ++){
        int xA, yA, xB, yB, a, b;
        cin >> xA >> yA >> xB >> yB >> a >> b;
        int 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;
}
