#include <bits/stdc++.h>
using namespace std;
vector<int> V, L;
vector<string> Ans;
map<int, int> M;
set<long long> S;
set<char>::iterator it;
long long n, m, a, b, c, d, e, f, x, y, z, t, l = 100, r, ans, cnt, score;
string s, winner, temp, p;
long long arr[1001][1001];
bool xy = 0;
char bd;
float ans1;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a >> b >> c >> d;
    if (abs(a - b) == min(c, d) and max(a, b) == max(c, d))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
