/**
 * Misleh mnogo, togava mi hrumna, che e ravno na liceto na pravougulnik sus strani a-xoff i b-yoff,
 * kudeto xoff i yoff sa absolutnite stojnosti na katetite na pravougulnika, kojto vektorut obrazuva.
 * Posle se chudih zashto ne trugva, no izvednuzh se setih, che UMNOJAVAM 10^6 po 10^6, zatoava mi
 * trqbva long long. Slojih edin define za ll, replace-nah vsichki "int" s "ll" (bez tozi na "int main") i trugna.
**/
#include <bits/stdc++.h>
#define ll long long int
using namespace std;
ll sign(ll n){
    if(n==0){return 0;}
    ll s = (n >> 31);
    if(s==0){s++;}
    return s;
}
ll solve(ll x1, ll y1, ll x2, ll y2, ll a, ll b){
//    cout << "(" << x1 << ", " << y1 << ") -> (" << x2 << ", " << y2 << ");  a=" << a << "; b=" << b << '\n';
    ll xoff = abs(x2 - x1);
    ll yoff = abs(y2 - y1);
    a = abs(a)+1;
    b = abs(b)+1;
//    cout << "\t[" << xoff << ", " << yoff << "]\ta|" << a << "\tb|" << b << '\n';
//    cout << "\t(" << a << " - " << xoff << ") * (" << b << " - " << yoff << ") = \n";
//    cout << "\t = " << (a-xoff) << " * " << (b-yoff) << " = \n";
//    cout << "\t = " << (a-xoff)*(b-yoff) << '\n';

    ll res1 = (a-xoff);
    ll res2 = (b-yoff);
    if((sign(res1) != 1) || (sign(res2) != 1)){
        return 0;
    }
    return res1*res2;
}
int main(){
    cin.sync_with_stdio(0);
    cin.tie(nullptr);
    ll t;
    cin >> t;
    ll x1, y1;
    ll x2, y2;
    ll a, b;
    for(ll i = 0; i < t; i++){
        cin >> x1 >> y1;
        cin >> x2 >> y2;
        cin >> a >> b;
        cout << solve(x1, y1, x2, y2, a, b);
        if(i + 1 != t){cout << '\n';}
    }
    return 0;
}
