#include <bits/stdc++.h>   using namespace std;   const long long N = 200005, INF = 2000000000000000000;   long double pi = 3.1415926535897932;   long long powere(long long a, long long b, long long p) {     if (a == 0) return 0;     long long res = 1;     a %= p;     while (b > 0) {       if (b & 1) res = (res * a) % p;       b >>= 1;       a = (a * a) % p;     }     return res;   }   void copy(long long a[2][2], long long b[2][2]) {     for (long long i = 0; i < 2; i++) {       for (long long j = 0; j < 2; j++) b[i][j] = a[i][j];     }   }   void matmult(long long m1[2][2], long long m2[2][2], long long m3[2][2]) {     for (long long i = 0; i < 2; i++) {       for (long long j = 0; j < 2; j++) {         m3[i][j] = 0;         for (long long k = 0; k < 2; k++) {           m3[i][j] +=               (m1[i][k] % 1000000007 * m2[k][j] % 1000000007) % 1000000007;           m3[i][j] %= 1000000007;         }       }     }   }   void power(long long mat[2][2], long long b, long long p,              long long finres[2][2]) {     long long res[2][2] = {{0}}, cc[2][2];     res[0][0] = res[1][1] = 1;     while (b > 0) {       copy(res, cc);       if (b & 1) matmult(mat, cc, res);       copy(mat, cc);       b >>= 1;       matmult(cc, cc, mat);     }     copy(res, finres);   }   int32_t main() {     std::ios::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     cout.precision(std::numeric_limits<double>::max_digits10);     ;     long long t;     cin >> t;     while (t--) {       long long x1, y1, x2, y2;       cin >> x1 >> y1 >> x2 >> y2;       long long x = abs(x1 - x2), y = abs(y1 - y2);       if (y < x) swap(x, y);       long long ans = (x * (x + 1));       ans += ((y - x - 1) * x);       cout << ans + 1 <<   n ;     }   }   