#include<iostream>
using namespace std;

int main(){
    int T, x1, y1, x2, y2, a, b, real_a, real_b;
    cin>>T;
    for(int i=0;i<T;i++)
    {
        cin>>x1>>y1>>x2>>y2>>a>>b;
        x2=x2-x1;
        x1=0;
        y2=y2-y1;
        y1=0;
        real_a=a-x2+1;
        real_b=b-y2+1;
        cout<<real_a*real_b<<endl;
    }
    return 0;
}