#include <bits/stdc++.h>
int main() {
  int t, a, b, c, d;
  std::cin >> t;
  while (t--) {
    std::cin >> a >> b >> c >> d;
    if (b < a) {
      std::swap(a, b);
    }
    if (d < c) {
      std::swap(c, d);
    }
    if (b == d && a + c == d) {
      std::cout << "YES" << std::endl;
    } else {
      std::cout << "NO" << std::endl;
    }
  }
}
