#include<bits/stdc++.h>
#define endl '\n'

using namespace std;

struct Vector {
    int x1;
    int y1;

    int x2;
    int y2;

    int dif_x;
    int dif_y;

    int a;
    int b;

    void calculate() {
        dif_x = abs(x1 - x2);
        dif_y = abs(y1 - y2);
    }
};

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

    long long int answer[10];

    int ammount;
    cin >> ammount;

    Vector all_vectors[10];

    for (int i = 0; i < ammount; i++) {
        cin >> all_vectors[i].x1 >> all_vectors[i].y1 >> all_vectors[i].x2 >> all_vectors[i].y2
        >> all_vectors[i].a >> all_vectors[i].b;

        all_vectors[i].calculate();
    }

    for (int i = 0; i < ammount; i++) {
        answer[i] = (all_vectors[i].a - all_vectors[i].dif_x + 1) * (all_vectors[i].b - all_vectors[i].dif_y + 1);
    }

    for (int i = 0; i < ammount; i++) {
        if (answer >= 0) cout << answer[i] << endl;
        else cout << 0 << endl;
    }

    return 0;
}
