#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  cin >> T;
  while (T--) {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    if (a + c == b && b == d) {
      cout << "YES" << endl;
      continue;
    }
    if (b + d == a && a == c) {
      cout << "YES" << endl;
      continue;
    }
    swap(c, d);
    if (a + c == b && b == d) {
      cout << "YES" << endl;
      continue;
    }
    if (b + d == a && a == c) {
      cout << "YES" << endl;
      continue;
    }
    cout << "NO" << endl;
  }
  return 0;
}
