#include<bits/stdc++.h>
using namespace std;
long long solve()
{
    long long x1,y1,x2,y2,a,b,x,y,br=0;
    cin>>x1>>y1>>x2>>y2>>a>>b;
    x=abs(x2-x1);
    y=abs(y2-y1);
    if((a-x+1)<0||(b-y+1)<0)return 0;
    ///if(x1>=0&&x1<=a&&y1>=0&&y1<=b&&x2>=0&&x2<=a&&y2>=0&&y2<=b)br=-1;
    return (a-x+1)*(b-y+1)+br;
}
int main ()
{
    int n;
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin>>n;
    for(int i=0;i<n;i++)
    {
        cout<<solve()<<endl;
    }
    return 0;
}
