#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 (min(a, b) + min(c, d) == max(a, b) && max(a, b) == max(c, d)) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
}
