#include<iostream>
using namespace std;

int main(){

    int T, x1, y1, x2, y2, a, b, real_x, real_y, real_a, real_b, otg[10];
    cin>>T;
    for(int t=0; t<T; t++)
    {
        cin>>x1>>y1>>x2>>y2>>a>>b;
        real_x=x2-x1;
        real_y=y2-y1;
        real_a=a-real_x+1;
        real_b=b-real_y+1;
        if(real_a<0)
        {
            real_a=0;
        }
        if(real_b<0)
        {
            real_b=0;
        }
        otg[t]=real_a*real_b;
    }
    for(int i=0; i<T; i++)
    {
        cout<<otg[i]<<endl;
    }
    return 0;
}