#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) {
    long long a, b, c, d;
    cin >> a >> b >> c >> d;
    long long a1 = max(a, b);
    long long b1 = min(a, b);
    long long a2 = max(c, d);
    long long b2 = min(c, d);
    if (a1 == a2) {
      if (b1 + b2 == a1)
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    } else
      cout << "NO" << endl;
  }
  return 0;
}
