#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
int main ()
{
    long long T;
    cin>>T;
    for(int i=0;i<T;i++)
    {
        long long x, y, x1, y1, a, b, otg=0;
        long long duljina, duljina2;
        cin>>x>>y>>x1>>y1>>a>>b;
        duljina=abs(x-x1);
        duljina2=abs(y-y1);
        ///cout<<duljina<<" "<<duljina2;
        if(a-duljina<0 || b-duljina2<0)
        {
            cout<<0;
            continue;
        }
        otg=(a-duljina+1)*(b-duljina2+1);
        cout<<otg<<endl;
    }

    return 0;
}
