#include <bits/stdc++.h>
using namespace std;
int t, a1, b1, a2, b2;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> t;
  for (int i = 1; i <= t; ++i) {
    cin >> a1 >> b1;
    cin >> a2 >> b2;
    if (a1 < b1) swap(a1, b1);
    if (a2 < b2) swap(a2, b2);
    if (((a1 == a2) && (b1 + b2 == a1)) || ((b1 == b2) && (a1 + a2 == b1)))
      cout << "YES" << '\n';
    else
      cout << "NO" << '\n';
  }
  return 0;
}
