#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 i=0;i<T;i++)
    {
        cin>>x1>>y1>>x2>>y2>>a>>b;
        x2=x2+(0-x1);
        x1=0;
        y2=y2+(0-y1);
        y1=0;
        if(x2<0)
        {
            x2*=-1;
        }
        if(y2<0)
        {
            y2*=-1;
        }
        real_a=a-x2+1;
        real_b=b-y2+1;
        if(real_a<0)
        {
            real_a=0;
        }
        if(real_b<0)
        {
            real_b=0;
        }
        otg[i]=real_a*real_b;
    }
    for(int i=0; i<T; i++)
    {
        cout<<otg[i]<<endl;
    }
    return 0;
}