#include <bits/stdc++.h>

#define endl '\n'

using namespace std;

void solve() {
    long long x1, y1, x2, y2, a, b; cin >> x1 >> y1 >> x2 >> y2 >> a >> b;

    long long deltaX = abs(x1 - x2);

    if (deltaX > a) {
        cout << 0 << endl;
        return;
    }

    long long deltaY = abs(y1 - y2);

    if (deltaY > b) {
        cout << 0 << endl;
        return;
    }

    long long ans = (a - deltaX + 1) * (b - deltaY + 1);

    cout << ans << endl;
}

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    int q; cin >> q;
    while (q--) solve();

    return 0;
}
