#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    vector<int> v1;
    for (int i = 0; i < (4); i++) {
      int d;
      cin >> d;
      v1.push_back(d);
    }
    if (max(v1[0], v1[1]) == max(v1[2], v1[3]) &&
        min(v1[0], v1[1]) + min(v1[2], v1[3]) == max(v1[0], v1[1]))
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
  return 0;
}
