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