#include <bits/stdc++.h>
using namespace std;
long long pw(long long a, long long b) {
  if (b == 0) return 1;
  if (b % 2 == 1)
    return (a * pw((a * a) % 1000000007, b / 2)) % 1000000007;
  else
    return (1 * pw((a * a) % 1000000007, b / 2)) % 1000000007;
}
void solve() {
  long long x1, x2, y1, y2;
  cin >> x1 >> y1 >> x2 >> y2;
  long long ans = abs(x1 - x2) * abs(y1 - y2) + 1;
  cout << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
