#include<iostream>
using namespace std;

int main(){

    int T, x1, y1, x2, y2, a, b, real_x, real_y, real_a, real_b;
    cin>>T;
    for(int t=0; t<T; t++)
    {
        cin>>x1>>y1>>x2>>y2>>a>>b;
        real_x=x2-x1;
        real_y=y2-y1;
        if(real_x<0)
        {
            real_x*=-1;
        }
        if(real_y<0)
        {
            real_y*=-1;
        }
        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;
        }
        cout<<real_a*real_b<<endl;
    }
    return 0;
}