#include <bits/stdc++.h>
int main() {
  int t, a, b, c, d;
  scanf("%d", &t);
  while (t--) {
    scanf("%d %d %d %d", &a, &b, &c, &d);
    if ((a == c) && (b + d) == a)
      printf("YES\n");
    else if ((a == d) && (b + c) == a)
      printf("YES\n");
    else if ((b == d) && (a + c) == b)
      printf("YES\n");
    else if ((b == c) && (a + d) == b)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
