#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int a, b;
    cin >> a >> b;
    long long int x, y;
    cin >> x >> y;
    if (b == y && a + x == b) {
      cout << "YES" << endl;
    } else if (b == x && a + y == b) {
      cout << "YES" << endl;
    } else if (a == x && b + y == a) {
      cout << "YES" << endl;
    } else if (a == y && b + x == a) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
