#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t, a1, a2, b1, b2;
  cin >> t;
  while (t--) {
    cin >> a1 >> a2 >> b1 >> b2;
    long long int temp = min(a1, a2);
    long long int temp2 = max(a1, a2);
    a1 = temp;
    a2 = temp2;
    temp = min(b1, b2);
    temp2 = max(b1, b2);
    b1 = temp;
    b2 = temp2;
    if (a1 + b1 == a2 && (a2 == b2))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
