#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long TTTT;
  cin >> TTTT;
  while (TTTT--) {
    long long a, b, c, d;
    cin >> a >> b >> c >> d;
    bool no = true;
    if (a == c) {
      if (b + d == a) {
        cout << "YES\n";
        continue;
      }
    }
    if (a == d) {
      if (b + c == a) {
        cout << "YES\n";
        continue;
      }
    }
    if (b == c) {
      if (a + d == b) {
        cout << "YES\n";
        continue;
      }
    }
    if (b == d) {
      if (a + c == b) {
        cout << "YES\n";
        continue;
      }
    }
    cout << "NO\n";
  }
  return 0;
}
