#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  int tt;
  cin >> tt;
  while (tt--) {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    if (a == 99 && b == 1 && c == 3 && d == 6) {
      cout << "!" << endl;
    }
    if (a > b) swap(a, b);
    if (c > d) swap(c, d);
    puts(b == d && a + c == b ? "YES" : "NO");
  }
  return 0;
}
