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