#include <bits/stdc++.h>
using namespace std;
long long prime[1000000];
void sieve() {
  prime[0] = 0;
  prime[1] = 0;
  for (long long i = 2; i < 1000000; i++) prime[i] = 1;
  for (long long i = 2; i * i < 1000000; i++)
    if (prime[i] == 1)
      for (long long j = i * i; j < 1000000; j += i) prime[j] = 0;
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  for (long long i = 2; i <= floor(sqrt(n)); i++)
    if (n % i == 0) return false;
  return true;
}
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
long long fastExponentiation(long long n, long long x, long long modulo) {
  long long res = 1;
  while (x > 0) {
    if (x & 1) res = (res * n) % modulo;
    x = x >> 1;
    n = (n * n) % modulo;
  }
  return res;
}
long long power(long long n, long long p) {
  if (p == 0) return 1;
  long long res = power((n * n) % 1000000007, p / 2);
  if (p % 2 == 1) res = (n * res) % 1000000007;
  return res;
}
bool isPowerOfTwo(long long n) {
  if (n == 0) return false;
  return (ceil(log2(n)) == floor(log2(n)));
}
void parr(long long a[], long long n) {
  for (long long i = 0; i < n; i++) cout << a[i] << " ";
  cout << "\n";
}
void iarr(long long a[], long long n) {
  for (long long i = 0; i < n; i++) cin >> a[i];
}
void solve() {
  long long a1, a2, b1, b2;
  cin >> a1 >> b1 >> a2 >> b2;
  if (b1 == a2 && a1 + b2 == b1) {
    cout << "YES\n";
  } else if (a1 == b2 && a2 + b1 == a1) {
    cout << "YES\n";
  } else if (b1 == b2 && a1 + a2 == b1) {
    cout << "YES\n";
  } else if (a1 == a2 && b1 + b2 == a1) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << setprecision(20) << fixed;
  long long t;
  cin >> t;
  while (t--) solve();
  return 0;
}
