#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(10);
  int tt;
  cin >> tt;
  for (int yy = 0; yy <= tt - 1; yy++) {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    int alpha = min(a, b) + min(c, d);
    if ((alpha == max(a, b)) && (alpha == max(c, d))) {
      cout << "Yes"
           << "\n";
    } else {
      cout << "No"
           << "\n";
    }
  }
  return 0;
}
