#include <bits/stdc++.h>
using namespace std;
bool isvowel(char c) {
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') return true;
  return false;
}
long long int isprime(long long int n) {
  for (long long int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) return 0;
  }
  return 1;
}
long long int power(long long int a, long long int b) {
  if (b == 0) return 1;
  if (b == 1) return a % 1000000007;
  long long int temp = power(a, b / 2);
  if (b % 2 == 0)
    return ((temp % 1000000007) * (temp % 1000000007)) % 1000000007;
  else
    return ((((temp % 1000000007) * (temp % 1000000007)) % 1000000007) * a %
            1000000007) %
           1000000007;
}
long long int c(long long int n, long long int k) {
  long long int C[n + 1][k + 1];
  long long int i, j;
  for (i = 0; i <= n; i++) {
    for (j = 0; j <= min(i, k); j++) {
      if (j == 0 || j == i)
        C[i][j] = 1;
      else
        C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]);
    }
  }
  return C[n][k];
}
long long int modInverse(long long int a, long long int m) {
  long long int m0 = m;
  long long int y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    long long int q = a / m;
    long long int t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
vector<long long int> graph[200005];
long long int visited[200005] = {0};
long long int depth[200005];
long long int siz[200005];
void dfs(long long int i, long long int d) {
  visited[i] = 1;
  depth[i] = d;
  if (graph[i].size() == 1) siz[i] = 0;
  for (long long int j = 0; j < graph[i].size(); j++) {
    if (!visited[graph[i][j]]) {
      dfs(graph[i][j], d + 1);
      siz[i] += siz[graph[i][j]] + 1;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    long long int x = x2 - x1;
    long long int y = y2 - y1;
    if (x1 == x2 || y1 == y2) {
      cout << "1" << endl;
      continue;
    }
    cout << x * y + 1 << endl;
  }
}
