#include<bits/stdc++.h>
using namespace std;
int main(){
    long long q,a1,b1,a2,b2,n,m;
    cin>>q;
    for(int i=0; i<q; i++){
        cin>>a1>>b1>>a2>>b2>>n>>m;
        cout<<max((long long)0,n-abs(a1-a2)+1)*max((long long)0,m-abs(b1-b2)+1)<<endl;
    }
    return 0;
}