#include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define HUGE_NUM 99999999999999999
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;


int main(){

	int Q;
	scanf("%d",&Q);

	int a,b,c,d;
	int minus;

	for(int loop = 0; loop < Q; loop++){

		scanf("%d %d %d %d",&a,&b,&c,&d);

		minus = 0;

		for(int row = a; row <= c; row++){
			for(int col = b; col <= d; col++){
				if(row%2 == 1 && col%2 == 0)minus++;
			}
		}

		printf("%d\n",(c-a+1)*(d-b+1)-minus);
	}

	return 0;
}

