#include <bits/stdc++.h>
using namespace std;
bool Sq(long x) {
  long double sr = sqrt(x);
  return ((sr - floor(sr)) == 0);
}
void solve() {
  int a1, b1, a2, b2;
  long num;
  scanf("%d %d", &a1, &b1);
  scanf("%d %d", &a2, &b2);
  num = a1 * b1 + a2 * b2;
  if ((max(a1, b1) == max(a2, b2)) &&
      min(a1, b1) + min(a2, b2) == max(a1, b1)) {
    printf("YES\n");
  } else
    printf("NO\n");
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    solve();
  }
  return 0;
}
