#include <bits/stdc++.h>
using namespace std;
long long int fact(long long int x) {
  long long int ans = 1;
  for (long long int i = 2; i <= x; i++) ans *= i;
  return ans;
}
long long int combinatorics(long long int n, long long int r) {
  long long int ans = 1;
  for (long long int k = 1; k <= r; k++) ans = ans * (n + 1 - k) / k;
  return ans;
}
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int a, b, c, d;
    cin >> a >> b >> c >> d;
    if (a + c == b && b == d) {
      cout << "YES" << endl;
      continue;
    } else if (a + d == b && b == c) {
      cout << "YES" << endl;
      continue;
    } else if (b + c == a && a == d) {
      cout << "YES" << endl;
      continue;
    } else if (b + d == a && a == c) {
      cout << "YES" << endl;
      continue;
    } else
      cout << "NO" << endl;
  }
}
