#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T gcd(T a, T b) {
  while (b) {
    T t = a % b;
    a = b;
    b = t;
  }
  return a;
}
template <class T>
inline T lcm(T a, T b) {
  return a * b / gcd(a, b);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long a, b, t, c, d;
  cin >> t;
  while (t-- > 0) {
    cin >> a >> b >> c >> d;
    if ((a + c == b && b == d) || (a + d == b && b == c) ||
        (b + c == a && a == d) || (b + d == a && c == a)) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}
