#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, a, b, c, d;
  cin >> t;
  while (t--) {
    cin >> a >> b >> c >> d;
    if ((c + a == b && b == d) || (a + d == b && b == c) ||
        (b + c == a && a == d) || (b + d == a && a == c))
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
