#include <bits/stdc++.h>
using LL = long long;
const LL MOD = 1e9+9;
using namespace std;



int main(){
    int q;cin >> q;
    for(int i = 0;i < q;i++){
        int a,b,c,d;
        cin >> a >> b >> c >> d;
        int ans = (c-a+1)*(d-b+1);
        for(int j = a;j <= c;j++){
            for(int k = b;k <= d;k++){
                if(j%2 == 1 && k%2 == 0){
                    ans--;
                }
            }
        }
        cout<<ans<<endl;
    }
}

