#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  int a1, b1, a2, b2;
  int m, n, p, q;
  cin >> t;
  while (t--) {
    cin >> a1 >> b1;
    cin >> a2 >> b2;
    m = max(a1, b1);
    n = max(a2, b2);
    p = min(a1, b1);
    q = min(a2, b2);
    if (m == n && m == p + q) {
      cout << "YES" << endl;
    } else
      cout << "NO" << endl;
  }
  return 0;
}
