#include<bits/stdc++.h>
using namespace std;
int solve()
{
    int x1,y1,x2,y2,a,b,x,y;
    cin>>x1>>y1>>x2>>y2>>a>>b;
    x=x2-x1;
    y=y2-y1;
    if((a-x+1)<0||(b-y+1)<0)return 0;
    return (a-x+1)*(b-y+1);
}
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;
}
