#include<bits/stdc++.h>
using namespace std;

void solution(int x1, int y1, int x2, int y2, int a, int b) {
    int x3 = abs(x2 - x1), y3 = abs(y2 - y1);
    if(a < x3 || b < y3) {
        cout<<'0'<<endl;
        return;
    }
    cout<<(a-x3+1) * (b-y3+1)<<endl;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int t;
    cin>>t;
    int x1, y1, x2, y2, a, b;
    for(int i = 0; i < t; i++) {
        cin>>x1>>y1>>x2>>y2>>a>>b;
        solution(x1, y1, x2, y2, a, b);
    }


    return 0;
}
