#include<bits/stdc++.h>
using namespace std;

int main ()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int T, x1, y1, x2, y2, A, B;
    cin >> T;
    for(int i = 0; i < T; i++)
    {
        cin >> x1 >> y1 >> x2 >> y2 >> A >> B;
        cout << (A - abs(x1 - x2) + 1) * (B - abs(y1 - y2) + 1) << endl;
    }
    return 0;
}
