#include<iostream>
using namespace std;

int main()
{
    int T;

    cin >> T;

    for(int i = 0; i < T; i++)
    {
        int x1, y1, x2, y2;
        int a, b;
        int d, s;
        long long br = 0;

        cin >> x1 >> y1;
        cin >> x2 >> y2;
        cin >> a >> b;

        d = x2 - x1;
        s = y2 - y1;

        if(d < 0) d=d*-1;
        if(s < 0) s=s*-1;

        br = (a - d + 1)*(b - s + 1);

        if( br < 0 )
        {
            cout << "0" << endl;
        }
        else
        {
            cout << br << endl;
        }
    }

    return 0;
}


