#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a0, a1, b0, b1;
  for (int i = 0; i < n; i++) {
    cin >> a0;
    cin >> a1;
    cin >> b0;
    cin >> b1;
    if (min(a0, a1) + min(b0, b1) == max(a0, a1) &&
        max(a0, a1) == max(b0, b1)) {
      cout << "YES" << '\n';
    } else {
      cout << "NO" << '\n';
    }
  }
  return 0;
}
