#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    cout << (max(a, b) == max(c, d) && max(a, b) == min(a, b) + min(c, d)
                 ? "YES"
                 : "NO")
         << endl;
  }
  return 0;
}
