#include <bits/stdc++.h>
using namespace std;
void solve() {
  int arr[4];
  int same = 1;
  for (int i = 0; i < 4; i++) cin >> arr[i];
  if (arr[0] == arr[2] and arr[1] + arr[3] == arr[0]) {
    cout << "YES"
         << "\n";
    return;
  } else if (arr[0] == arr[3] and arr[1] + arr[2] == arr[0]) {
    cout << "YES"
         << "\n";
    return;
  } else if (arr[1] == arr[2] and arr[0] + arr[3] == arr[1]) {
    cout << "YES"
         << "\n";
    return;
  } else if (arr[1] == arr[3] and arr[0] + arr[2] == arr[1]) {
    cout << "YES"
         << "\n";
    return;
  } else
    cout << "NO"
         << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  cin >> t;
  while (t--) solve();
}
