#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int a, b, x, y;
    cin >> a >> b >> x >> y;
    vector<int> v;
    v.push_back((a - 1 - x) * (b));
    v.push_back((x) * (b));
    v.push_back((b - 1 - y) * (a));
    v.push_back((y) * (a));
    cout << *max_element(v.begin(), v.end()) << endl;
  }
  return 0;
}
