#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long a1, b1, a2, b2;
    cin >> a1 >> b1;
    cin >> a2 >> b2;
    string ans = "NO";
    if (max(a1, b1) == max(a2, b2))
      if (min(a1, b1) + min(a2, b2) == max(a1, b1)) ans = "YES";
    cout << ans << "\n";
  }
}
