#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long a1, b1;
  cin >> a1 >> b1;
  long long a2, b2;
  cin >> a2 >> b2;
  if (a1 == a2 && b1 + b2 == a1)
    cout << "YES\n";
  else if (a1 == b2 && b1 + a2 == a1)
    cout << "YES\n";
  else if (b1 == a2 && a1 + b2 == b1)
    cout << "YES\n";
  else if (b1 == b2 && a1 + a2 == b1)
    cout << "YES\n";
  else
    cout << "NO\n";
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) solve();
  return 0;
}
