#include<iostream>
using namespace std;
int main ()
{
    int T, x1, y1, x2, y2, a, b;
    cin>>T;
    for(int i=0; i<T; i++)
    {
        cin>>x1>>y1>>x2>>y2>>a>>b;
        if(a-(x2-x1)<-1 || b-(y2-y1)<-1)
        {
            cout<<"0";
        }
        else
        {
            cout<<(a-(x2-x1)+1)*(b-(y2-y1)+1);
        }
        cout<<endl;
    }
    return 0;
}
