#include <bits/stdc++.h>
using namespace std;
class Node {
 public:
  int data;
  struct Node* next;
};
class treeNode {
 public:
  int data;
  treeNode* right;
  treeNode* left;
};
treeNode* GetNewNode(int data) {
  treeNode* newNode = new treeNode();
  newNode->data = data;
  newNode->right = NULL;
  newNode->left = NULL;
  return newNode;
}
treeNode* Insert(treeNode* root, int data) {
  if (root == NULL) {
    root = GetNewNode(data);
  } else if (data <= root->data) {
    root->left = Insert(root->left, data);
  } else {
    root->right = Insert(root->right, data);
  }
  return root;
}
void inOrderRec(treeNode* root) {
  if (root != NULL) {
    inOrderRec(root->left);
    cout << root->data << " ";
    inOrderRec(root->right);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cerr.tie(0);
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int l1, l2, w1, w2;
    cin >> l1 >> w1 >> l2 >> w2;
    int maxi1 = max(l1, w1), maxi2 = max(l2, w2);
    int mini1 = min(l1, w1), mini2 = min(l2, w2);
    if (maxi1 == maxi2) {
      if (mini1 + mini2 == maxi1) {
        cout << "YES"
             << "\n";
        continue;
      } else
        cout << "NO"
             << "\n";
    } else
      cout << "NO"
           << "\n";
  }
  return 0;
}
