Vasya claims that he had a paper square. He cut it into two rectangular parts using one vertical or horizontal cut. Then Vasya informed you the dimensions of these two rectangular parts. You need to check whether Vasya originally had a square. In other words, check if it is possible to make a square using two given rectangles.


-----Input-----

The first line contains an integer $t$ ($1 \le t \le 10^4$) — the number of test cases in the input. Then $t$ test cases follow.

Each test case is given in two lines.

The first line contains two integers $a_1$ and $b_1$ ($1 \le a_1, b_1 \le 100$) — the dimensions of the first one obtained after cutting rectangle. The sizes are given in random order (that is, it is not known which of the numbers is the width, and which of the numbers is the length).

The second line contains two integers $a_2$ and $b_2$ ($1 \le a_2, b_2 \le 100$) — the dimensions of the second obtained after cutting rectangle. The sizes are given in random order (that is, it is not known which of the numbers is the width, and which of the numbers is the length).


-----Output-----

Print $t$ answers, each of which is a string "YES" (in the case of a positive answer) or "NO" (in the case of a negative answer). The letters in words can be printed in any case (upper or lower).


-----Example-----
Input
3
2 3
3 1
3 2
1 3
3 3
1 3

Output
Yes
Yes
No

Source: codeforces | Difficulty: EASY
Tags: Mathematics

Implementation

Complete search


Solutions:
t = int(input())
for i in range(t):
	sides1 = list(map(int, input().split()))
	sides2 = list(map(int, input().split()))
	sides1.sort()
	sides2.sort()
	if sides1[-1] == sides2[-1] and sides2[0] + sides1[0] == sides2[-1]:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(a1, b1) = sorted(map(int, input().split()))
	(a2, b2) = sorted(map(int, input().split()))
	if a1 + a2 == b1 and b1 == b2:
		print('Yes')
	else:
		print('No')


testCases = int(input())
for _ in range(testCases):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 > b1:
		if a1 == b1 + a2 and a1 == b2 or (a1 == b1 + b2 and a1 == a2):
			print('YES')
		else:
			print('NO')
	elif b1 == a1 + a2 and b1 == b2 or (b1 == a1 + b2 and b1 == a2):
		print('YES')
	else:
		print('NO')


for f in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if max(a1, b1) == max(a2, b2) and min(a1, b1) + min(a2, b2) == max(a1, b1):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a == c and b + d == a:
		print('Yes')
	elif a == d and b + c == a:
		print('Yes')
	elif b == c and a + d == b:
		print('Yes')
	elif b == d and a + c == b:
		print('Yes')
	else:
		print('No')


t = int(input())
listA = []
flag = 0
for i in range(0, t):
	(a, b) = [int(i) for i in input().split()]
	(c, d) = [int(i) for i in input().split()]
	if max(a, b) == max(c, d) and min(a, b) + min(c, d) == max(a, b):
		listA.append('Yes')
	else:
		listA.append('No')
print('\n'.join(listA))


t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a + d == b == c:
		print('YES')
	elif b + c == a == d:
		print('YES')
	elif a + c == d == b:
		print('YES')
	elif b + d == a == c:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if max(a, b) == min(a, b) + min(c, d) and max(a, b) == max(c, d):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(a1, b1) = input().split()
	(a2, b2) = input().split()
	(a1, b1, a2, b2) = (int(a1), int(b1), int(a2), int(b2))
	if a1 == b2 and b1 + a2 == a1 or (a2 == b1 and b2 + a1 == a2) or (a1 == a2 and a1 == b1 + b2) or (b1 == b2 and b1 == a1 + a2):
		print('YES')
	else:
		print('NO')


for T in range(int(input())):
	a = input().split()
	b = input().split()
	a = list(map(int, a))
	b = list(map(int, b))
	a = sorted(a, reverse=True)
	b = sorted(b, reverse=True)
	if a[0] == b[0] and a[-1] + b[-1] == a[0]:
		print('Yes')
	else:
		print('No')


import math
t = int(input())
while t > 0:
	(n1, n2) = map(int, input().split())
	(m1, m2) = map(int, input().split())
	p = n1 * n2 + m1 * m2
	s = math.sqrt(p)
	if n1 == m1 and n1 == n2 + m2 and (s - math.floor(s) == 0):
		print('YES')
	elif n1 == m2 and n1 == n2 + m1 and (s - math.floor(s) == 0):
		print('YES')
	elif n2 == m1 and n2 == m2 + n1 and (s - math.floor(s) == 0):
		print('YES')
	elif n2 == m2 and n2 == m1 + n1 and (s - math.floor(s) == 0):
		print('YES')
	else:
		print('NO')
	t -= 1


for _ in range(int(input())):
	(a, b) = sorted(map(int, input().split()))
	(c, d) = sorted(map(int, input().split()))
	print('YES' if b == d and a + c == b else 'NO')


for tc in range(int(input())):
	(a1, b1) = input().split()
	(a2, b2) = input().split()
	if a1 == a2 and int(a1) == int(b1) + int(b2):
		print('Yes')
	elif a1 == b2 and int(a1) == int(b1) + int(a2):
		print('Yes')
	elif b1 == a2 and int(b1) == int(a1) + int(b2):
		print('Yes')
	elif b1 == b2 and int(b1) == int(a1) + int(a2):
		print('Yes')
	else:
		print('No')


import math
for _ in range(int(input())):
	(a, b) = input().split()
	a = int(a)
	b = int(b)
	(c, d) = input().split()
	c = int(c)
	d = int(d)
	result = a * b + c * d
	result1 = math.sqrt(result)
	x = int(result1)
	if x == result1 and (a != b and c != d) and (x == a or x == b) and (x == c or x == d) and (x == a + c or x == b + c or x == b + d or (x == a + d)):
		print('yes')
	else:
		print('no')


n = int(input())

def arrayToInt(arr):
	return [int(val) for val in arr]

def isRect(a, b):
	for x in a:
		if x in b:
			restA = a.copy()
			restA.remove(x)
			restB = b.copy()
			restB.remove(x)
			if int(restA[0]) + int(restB[0]) == x:
				return True
	return False
for i in range(n):
	a = arrayToInt(input().split())
	b = arrayToInt(input().split())
	if isRect(a, b):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	if max(a) != max(b):
		print('No')
		continue
	s = max(a)
	print('Yes' if s == min(a) + min(b) else 'No')


for _ in ' ' * int(input()):
	(a, b) = sorted(map(int, input().split()))
	(c, d) = sorted(map(int, input().split()))
	print(['no', 'yes'][a + c == b == d])


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split(' '))
	(c, d) = map(int, input().split(' '))
	v = min(a, b) + min(c, d)
	if v == max(a, b) and v == max(c, d):
		print('Yes')
	else:
		print('No')


t = int(input())
for w in range(t):
	(a1, b1) = (int(i) for i in input().split())
	(a2, b2) = (int(i) for i in input().split())
	if b1 < a1:
		(a1, b1) = (b1, a1)
	if a2 > b2:
		(a2, b2) = (b2, a2)
	if a1 + a2 == b1 and a1 + a2 == b2:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a == b + d and a == c:
		print('YES')
		continue
	if a + c == b and b == d:
		print('YES')
		continue
	if a == b + c and a == d:
		print('YES')
		continue
	if a + d == b and b == c:
		print('YES')
		continue
	if b == a + c and b == d:
		print('YES')
		continue
	if b + d == a and a == c:
		print('YES')
		continue
	if b == a + d and b == c:
		print('YES')
		continue
	if b + c == a and a == d:
		print('YES')
		continue
	print('NO')


from fractions import Fraction
import sys
import bisect
import heapq
from math import *
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
mod = 1000000007

def inp():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def graph(vertex):
	return [[] for i in range(0, vertex + 1)]

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans
for i in range(int(inp())):
	(a1, b1) = list(map(int, inp().split()))
	(a2, b2) = list(map(int, inp().split()))
	a = min(a1, b1)
	b = min(a2, b2)
	c = a + b
	d = max(a1, b1)
	e = max(a2, b2)
	if d != e:
		print('NO')
	elif c == d and c == e:
		print('YES')
	else:
		print('NO')


noTestCases = int(input())
for case in range(noTestCases):
	sidesRect1 = input().split()
	sidesRect2 = input().split()
	side1Rect1 = int(sidesRect1[0])
	side2Rect1 = int(sidesRect1[1])
	side1Rect2 = int(sidesRect2[0])
	side2Rect2 = int(sidesRect2[1])
	isSquare = False
	if side1Rect1 == side1Rect2:
		if side2Rect1 + side2Rect2 == side1Rect1:
			isSquare = True
	if side1Rect1 == side2Rect2:
		if side2Rect1 + side1Rect2 == side1Rect1:
			isSquare = True
	if side2Rect1 == side1Rect2:
		if side1Rect1 + side2Rect2 == side2Rect1:
			isSquare = True
	if side2Rect1 == side2Rect2:
		if side1Rect1 + side1Rect2 == side2Rect1:
			isSquare = True
	if isSquare:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	e = max(a, b)
	f = min(a, b)
	(c, d) = map(int, input().split())
	a = max(c, d)
	b = min(c, d)
	if a == e and a == b + f:
		print('YES')
	elif a == f and a == b + e:
		print('YES')
	elif b == e and b == a + f:
		print('YES')
	elif b == f and b == a + e:
		print('YES')
	else:
		print('NO')


def list_int():
	return list(map(int, input().split()))

def int_in():
	return int(input())

def map_in():
	return map(int, input().split())

def list_in():
	return input().split()
t = int_in()
for _ in range(t):
	(a, b) = map_in()
	(c, d) = map_in()
	if a == c and b + d == c:
		print('YES')
	elif a == d and b + c == d:
		print('YES')
	elif b == c and a + d == c:
		print('YES')
	elif b == d and a + c == b:
		print('YES')
	else:
		print('NO')


n = int(input())
squares = [[list(map(int, input().split())), list(map(int, input().split()))] for i in range(n)]
for square in squares:
	max0 = max(square[0])
	max1 = max(square[1])
	if max0 == max1:
		if min(square[0]) + min(square[1]) == max0:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	(x, y) = map(int, input().split())
	if a == x and a == b + y or (a == y and a == b + x) or (b == x and b == a + y) or (b == y and b == a + x):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	aa = list(map(int, input().split()))
	bb = list(map(int, input().split()))
	st = 0
	for i in range(2):
		for j in range(2):
			c = set()
			c.add(aa[i] + bb[j])
			c.add(aa[1 - i])
			c.add(bb[1 - j])
			if len(c) == 1:
				st = 1
	if st == 1:
		print('Yes')
	else:
		print('No')


from collections import Counter
import math
import sys
from bisect import bisect, bisect_left, bisect_right

def input():
	return sys.stdin.readline().strip()

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def mod():
	return 10 ** 9 + 7
for _ in range(INT()):
	(a1, a2) = MAP()
	(b1, b2) = MAP()
	if a1 + b1 == a2 and a2 == b2 or (a1 + b2 == a2 and a2 == b1) or (a2 + b1 == a1 and a1 == b2) or (a2 + b2 == a1 and a1 == b1):
		print('YES')
	else:
		print('NO')


import sys
import os
import math
import copy
from math import gcd
from bisect import bisect
from io import BytesIO, IOBase
from math import sqrt, floor, factorial, gcd, log, ceil
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations

def Int():
	return int(sys.stdin.readline())

def Mint():
	return map(int, sys.stdin.readline().split())

def Lstr():
	return list(sys.stdin.readline().strip())

def Str():
	return sys.stdin.readline().strip()

def Mstr():
	return map(str, sys.stdin.readline().strip().split())

def List():
	return list(map(int, sys.stdin.readline().split()))

def Hash():
	return dict()

def Mod():
	return 1000000007

def Ncr(n, r, p):
	return fact[n] * (ifact[r] * ifact[n - r] % p) % p

def Most_frequent(list):
	return max(set(list), key=list.count)

def Mat2x2(n):
	return [List() for _ in range(n)]

def btod(n):
	return int(n, 2)

def dtob(n):
	return bin(n).replace('0b', '')

def solution():
	for _ in range(Int()):
		(a1, b1) = Mint()
		(a2, b2) = Mint()
		if a1 > b1:
			(a1, b1) = (b1, a1)
		if a2 > b2:
			(a2, b2) = (b2, a2)
		if a1 + a2 == b1 == b2:
			print('Yes')
		else:
			print('No')
solution()


def noo():
	print('No')

def yes():
	print('Yes')
no = []
length = int(input())
i = 1
while i <= length * 2:
	num = input()
	no.append(num)
	i += 1
i = 1
while i <= length:
	numbers = no[0]
	split = numbers.split(' ')
	a1 = int(split[0])
	b1 = int(split[1])
	numbers2 = no[1]
	split2 = numbers2.split(' ')
	a2 = int(split2[0])
	b2 = int(split2[1])
	if a1 > b1:
		if a1 == a2:
			if b1 + b2 == a1:
				yes()
			else:
				noo()
		elif a1 == b2:
			if b1 + a2 == a1:
				yes()
			else:
				noo()
		else:
			noo()
	elif a1 < b1:
		if b1 == a2:
			if a1 + b2 == b1:
				yes()
			else:
				noo()
		elif b1 == b2:
			if a1 + a2 == b1:
				yes()
			else:
				noo()
		else:
			noo()
	else:
		noo()
	no.remove(numbers)
	no.remove(numbers2)
	i += 1


t = int(input())
for i in range(t):
	(a1, b1) = input().split()
	a1 = int(a1)
	b1 = int(b1)
	(a2, b2) = input().split()
	a2 = int(a2)
	b2 = int(b2)
	if a1 == a2 and b1 + b2 == a1:
		print('yes')
	elif a1 == b2 and a2 + b1 == a1:
		print('yes')
	elif b1 == a2 and b2 + a1 == b1:
		print('yes')
	elif b1 == b2 and a1 + a2 == b1:
		print('yes')
	else:
		print('no')


def solve():
	a = list(map(int, input().split()))
	aa = sum(a)
	b = list(map(int, input().split()))
	bb = sum(b)
	for i in a:
		for j in b:
			if i == j and aa - i + bb - j == i:
				print('yes')
				return
	print('No')
	return
n = int(input())
for i in range(n):
	solve()


t = int(input())
for _ in range(t):
	(a1, a2) = map(int, input().strip().split())
	(b1, b2) = map(int, input().strip().split())
	if max(a1, a2) == max(b1, b2) == min(a1, a2) + min(b1, b2):
		print('yes')
	else:
		print('no')


t = int(input())
while t > 0:
	t -= 1
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	(a, b) = (min(a, b), max(a, b))
	if a + c == b == d or a + d == b == c:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	a.sort()
	b.sort()
	if a[0] + b[0] == a[1] and a[0] + b[0] == b[1]:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	arr1 = list(map(int, input().split()))
	arr2 = list(map(int, input().split()))
	arr3 = [i for i in arr1 for j in arr2 if i == j]
	c1 = 0
	c2 = 0
	if len(arr3) == 0:
		print('No')
		continue
	arr3[0] = max(arr3)
	for i in arr1:
		if arr3[0] != i:
			c1 = i
	for i in arr2:
		if arr3[0] != i:
			c2 = i
	if arr3[0] == c1 + c2:
		print('Yes')
	else:
		print('No')


from math import *
from collections import *
from operator import itemgetter
import bisect
ii = lambda : int(input())
iia = lambda : list(map(int, input().split()))
isa = lambda : list(input().split())
I = lambda : list(map(int, input().split()))
chrIdx = lambda x: ord(x) - 96
idxChr = lambda x: chr(96 + x)
t = ii()
for _ in range(t):
	(a, b) = iia()
	(c, d) = iia()
	if a + c == b and b == d or (a + d == b and b == c) or (b + c == d and d == a) or (b + d == c and c == a):
		print('Yes')
	else:
		print('No')


def main():
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a == d and c + b == a:
		print('Yes')
	elif b == c and a + d == b:
		print('Yes')
	elif a == c and b + d == c:
		print('Yes')
	elif b == d and a + c == b:
		print('Yes')
	else:
		print('No')
t = int(input())
while t:
	main()
	t -= 1


t = int(input())
while t:
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	x1 = min(a1, b1)
	y1 = max(a1, b1)
	x2 = min(a2, b2)
	y2 = max(a2, b2)
	if x1 + x2 == y1 and y1 == y2:
		print('Yes')
	else:
		print('No')
	t -= 1


for _ in range(int(input())):
	(a1, b1) = list(map(int, input().split()))
	(a2, b2) = list(map(int, input().split()))
	if a1 == a2 == b1 + b2 or a1 == b2 == a2 + b1 or a2 == b1 == a1 + b2 or (b1 == b2 == a2 + a1):
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(a, b) = sorted(list(map(int, input().split())))
	(c, d) = sorted(list(map(int, input().split())))
	if a + c == d and b == d:
		print('Yes')
	else:
		print('No')


t = int(input())
answers = []
for i in range(t):
	(x, y) = map(int, input().split())
	(a, b) = map(int, input().split())
	p = [x, y]
	q = [a, b]
	if max(p) == max(q) and min(p) + min(q) == max(p):
		answers.append('Yes')
	else:
		answers.append('No')
for i in answers:
	print(i)


ncases = int(input())
l = []
for i in range(ncases):
	s1 = input().split(' ')
	s2 = input().split(' ')
	d0 = int(s1[0])
	d1 = int(s1[1])
	d2 = int(s2[0])
	d3 = int(s2[1])
	if d0 == d2 and d1 + d3 == d0:
		l.append('yes')
		continue
	elif d0 == d3 and d1 + d2 == d3:
		l.append('yes')
	elif d1 == d2 and d0 + d3 == d1:
		l.append('yes')
	elif d1 == d3 and d0 + d2 == d1:
		l.append('yes')
	else:
		l.append('no')
for j in l:
	print(j)


n = int(input())
for i in range(n):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 == a2:
		if b1 + b2 == a1 or (a1 + a2 == b1 and a1 + a2 == b2):
			print('Yes')
		else:
			print('No')
	elif a1 == b2:
		if b1 + a2 == a1 or (a1 + b2 == b1 and a1 + b2 == a2):
			print('Yes')
		else:
			print('No')
	elif b1 == a2:
		if a1 + b2 == b1 or (b1 + a2 == a1 and b1 + a2 == b2):
			print('Yes')
		else:
			print('No')
	elif b1 == b2:
		if a1 + a2 == b1 or (b1 + b2 == a1 and b1 + b2 == a2):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


n = int(input())
output = []
for _ in range(n):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	x1 = a[0]
	x2 = a[1]
	y1 = b[0]
	y2 = b[1]
	o = 'No'
	if x1 + y1 == x2 and x2 == y2:
		o = 'Yes'
	elif x1 + y2 == x2 and x2 == y1:
		o = 'Yes'
	elif x2 + y2 == x1 and x1 == y1:
		o = 'Yes'
	elif x2 + y1 == x1 and x1 == y2:
		o = 'Yes'
	output.append(o)
for o in output:
	print(o)


t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split(' '))
	(a1, b1) = map(int, input().split(' '))
	x = max(a, b)
	if x == a1:
		if min(a, b) + b1 == a1:
			print('Yes')
		else:
			print('No')
	elif x == b1:
		if min(a, b) + a1 == b1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


import math

def rsq(l, d):
	l.sort()
	d.sort()
	if l[0] + d[0] == l[1] and l[0] + d[0] == d[1]:
		print('yes')
	else:
		print('no')
	return
t = int(input())
for i in range(t):
	T = input()
	p = input()
	l = list(map(int, T.split(' ')))
	d = list(map(int, p.split(' ')))
	rsq(l, d)


test_case = int(input())
piece_1 = []
piece_2 = []
for i in range(test_case):
	piece_1.append([int(j) for j in input().split()])
	piece_2.append([int(l) for l in input().split()])
for k in range(test_case):
	if piece_1[k][0] == piece_2[k][0] and piece_1[k][1] + piece_2[k][1] == piece_1[k][0]:
		print('YES')
	elif piece_1[k][0] == piece_2[k][1] and piece_1[k][1] + piece_2[k][0] == piece_1[k][0]:
		print('YES')
	elif piece_1[k][1] == piece_2[k][0] and piece_1[k][0] + piece_2[k][1] == piece_1[k][1]:
		print('YES')
	elif piece_1[k][1] == piece_2[k][1] and piece_1[k][0] + piece_2[k][0] == piece_1[k][1]:
		print('YES')
	else:
		print('NO')


def is_square(a1, b1, a2, b2):
	ans = 'YES'
	side1 = min(a1, b1) + min(a2, b2)
	side2 = max(a1, b1)
	side3 = max(a2, b2)
	if side1 == side2 and side2 == side3 and (side3 == side1):
		ans = 'YES'
	else:
		ans = 'NO'
	return ans
t = int(input())
for _ in range(t):
	(a1, b1) = [int(i) for i in input().split()]
	(a2, b2) = [int(i) for i in input().split()]
	ans = is_square(a1, b1, a2, b2)
	print(ans)


import math
for _ in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	summ = min(a1, b1) + min(a2, b2)
	if summ == max(a1, b1) and summ == max(a2, b2):
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(a, b) = sorted(map(int, input().split()))
	(c, d) = sorted(map(int, input().split()))
	print('yneos'[d != b or a + c != d:5:2])


t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a + c == b and b == d or (a == c and b + d == c):
		print('yEs')
	else:
		(a, b) = (b, a)
		if a + c == b and b == d or (a == c and b + d == c):
			print('yES')
		else:
			print('nO')


from sys import stdin

def main():
	readline = stdin.readline
	t = int(readline())
	for i in range(t):
		a = list(map(int, readline().split()))
		b = list(map(int, readline().split()))
		n = min(a) + min(b)
		m = max(a)
		l = max(b)
		if n == m and n == l:
			print('Yes')
		else:
			print('No')
main()


t = int(input())
for i in range(t):
	a1b1 = input().split()
	a2b2 = input().split()
	a1 = int(a1b1[0])
	b1 = int(a1b1[1])
	a2 = int(a2b2[0])
	b2 = int(a2b2[1])
	max1 = max(a1, b1)
	min1 = min(a1, b1)
	max2 = max(a2, b2)
	min2 = min(a2, b2)
	if max1 == max2 and min1 + min2 == max1:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	a = []
	x = input().split()
	for i in x:
		a.append(int(i))
	a.sort()
	b = []
	x = input().split()
	for i in x:
		b.append(int(i))
	b.sort()
	if a[-1] == b[-1] and a[0] + b[0] == a[-1]:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	x = min(a, b) + min(c, d)
	if max(a, b) == max(c, d) and x == max(a, b):
		print('Yes')
	else:
		print('No')


test = int(input())
while test > 0:
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a > b:
		(a, b) = (b, a)
	if c > d:
		(c, d) = (d, c)
	if a + c == b and b == d:
		print('YES')
	else:
		print('NO')
	test -= 1


def to_list(s):
	return list(map(lambda x: int(x), s.split(' ')))

def solve(a1, b1, a2, b2):
	if (a1 + a2 == b1) & (b1 == b2) | (a1 + b2 == a2) & (a2 == b1) | (b1 + a2 == a1) & (a1 == b2) | (b1 + b2 == a2) & (a2 == a1):
		return 'YES'
	else:
		return 'NO'
t = int(input())
answers = []
for i in range(t):
	(a1, b1) = to_list(input())
	(a2, b2) = to_list(input())
	answers.append(solve(a1, b1, a2, b2))
print('\n'.join(answers))


from math import sqrt

def solve():
	a = list(map(int, input().split()))
	a1 = a[0]
	b1 = a[1]
	b = list(map(int, input().split()))
	a2 = b[0]
	b2 = b[1]
	status = 'NO'
	if a1 == a2:
		if b1 + b2 == a1:
			status = 'YES'
	if a1 == b2:
		if b1 + a2 == a1:
			status = 'YES'
	if b1 == a2:
		if a1 + b2 == b1:
			status = 'YES'
	if b1 == b2:
		if a1 + a2 == b1:
			status = 'YES'
	print(status)
t = int(input())
for tt in range(1, t + 1):
	solve()


for t in range(int(input())):
	(a, b) = sorted(map(int, input().split()))
	(c, d) = sorted(map(int, input().split()))
	print('NYOE S'[b == d and a + c == b::2])


t = int(input())
for j in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if max(a1, b1) == max(a2, b2) and min(a1, b1) + min(a2, b2) == max(a1, b1):
		print('Yes')
	else:
		print('No')


n = int(input(''))
l = []

def findOrder(a):
	if int(a[0]) < int(a[1]):
		return (int(a[0]), int(a[1]))
	elif int(a[0]) > int(a[1]):
		return (int(a[1]), int(a[0]))
	else:
		return (int(a[1]), int(a[0]))

def check(a, b):
	(mina, maxa) = findOrder(a)
	(minb, maxb) = findOrder(b)
	if maxa == maxb and mina + minb == maxa:
		l.append('Yes')
	else:
		l.append('No')
for i in range(n):
	a = input('').split(' ')
	b = input('').split(' ')
	check(a, b)
for i in l:
	print(i)


for _ in range(int(input())):
	(x, y) = sorted(map(int, input().split()))
	(u, v) = sorted(map(int, input().split()))
	print('Yes' if y == v == x + u else 'No')


for _ in range(int(input())):
	(a, b) = input().split()
	(c, d) = input().split()
	a = int(a)
	b = int(b)
	c = int(c)
	d = int(d)
	if min(a, b) + min(c, d) == max(a, b) and min(a, b) + min(c, d) == max(c, d):
		print('Yes')
	else:
		print('NO')


z = input
mod = 10 ** 9 + 7
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)
n = int(input())
for i in range(n):
	(a, b) = sorted(list(map(int, z().split())))
	(c, d) = sorted(list(map(int, z().split())))
	t1 = a * b
	t2 = c * d
	t = t1 + t2
	p = int(t ** 0.5)
	if int(t ** 0.5) == t ** 0.5 and p >= b and (p >= d) and (a + c == d):
		print('yes')
	else:
		print('no')


for i in range(int(input())):
	(a1, b1) = list(map(int, input().split()))
	(a2, b2) = list(map(int, input().split()))
	if a1 > b1:
		(a1, b1) = (b1, a1)
	if a2 > b2:
		(a2, b2) = (b2, a2)
	good = b1 == b2
	good &= a1 + a2 == b1
	print('YES' if good else 'NO')


for _ in range(int(input())):
	(n, m) = map(int, input().split())
	(n2, m2) = map(int, input().split())
	if m < n:
		(n, m) = (m, n)
	if m2 < n2:
		(n2, m2) = (m2, n2)
	print('Yes' if n + n2 == m and m == m2 else 'No')


import math
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if min(c, d) + min(a, b) == max(a, b) and max(a, b) == max(c, d):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if max(a1, b1) != max(a2, b2):
		print('No')
		continue
	if min(a1, b1) + min(a2, b2) == max(a1, b1):
		print('Yes')
	else:
		print('No')


for i in range(10000000):
	a = 0
for i in range(int(input())):
	(a1, b1) = (int(j) for j in input().split())
	(a2, b2) = (int(j) for j in input().split())
	print('YES' if a1 == a2 == b1 + b2 or b1 == b2 == a1 + a2 or a1 == b2 == a2 + b1 or (a2 == b1 == a1 + b2) else 'NO')


import sys
n_cases = int(next(sys.stdin))
for _ in range(n_cases):
	(a1, b1) = sorted(map(int, next(sys.stdin).split()))
	(a2, b2) = sorted(map(int, next(sys.stdin).split()))
	print(['No', 'Yes'][a1 + a2 == b1 == b2])


T = int(input())
while T > 0:
	(a, b) = sorted(map(int, input().split()))
	(x, y) = sorted(map(int, input().split()))
	if a + x == b and b == y:
		print('YES')
	else:
		print('NO')
	T -= 1


T = int(input())
for cas in range(T):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a == c and b + d == a or (b == c and a + d == b) or (a == d and b + c == a) or (b == d and a + c == b):
		print('yes')
	else:
		print('no')


I = lambda : list(map(int, input().split()))
for _ in range(int(input())):
	(a1, b1) = sorted(I())
	(a2, b2) = sorted(I())
	if a1 == a2:
		if b1 == b2:
			if 2 * a1 == b1 or 2 * b1 == a1:
				print('YES')
			else:
				print('NO')
		elif b1 + b2 == a1:
			print('YES')
		else:
			print('NO')
	elif b1 == b2:
		if a1 + a2 == b1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(a, b) = [int(j) for j in input().strip().split()]
	(c, d) = [int(j) for j in input().strip().split()]
	if max(a, b) != max(c, d):
		print('NO')
	elif max(a, b) != min(a, b) + min(c, d):
		print('NO')
	else:
		print('YES')


from sys import stdin, exit
input = stdin.readline

def i():
	return input()

def ii():
	return int(input())

def iis():
	return list(map(int, input().split()))

def liis():
	return list(map(int, input().split()))

def print_array(a):
	print(' '.join(map(str, a)))
t = ii()
for _ in range(t):
	(a1, b1) = iis()
	(a2, b2) = iis()
	if a1 == a2 and b1 + b2 == a1 or (a1 == b2 and a2 + b1 == a1) or (a2 == b1 and a1 + b2 == a2) or (b2 == b1 and a1 + a2 == b2):
		print('Yes')
	else:
		print('No')


from math import sqrt
t = int(input())
for i in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	flag = False
	if a1 == a2 and b1 + b2 == a1:
		flag = True
	if b1 == b2 and a1 + a2 == b1:
		flag = True
	if a1 == b2 and a2 + b1 == a1:
		flag = True
	if b1 == a2 and a1 + b2 == b1:
		flag = True
	if flag:
		print('Yes')
	else:
		print('No')


T = int(input())
for _ in range(0, T):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	A1 = min(a1, b1)
	B1 = max(a1, b1)
	A2 = min(a2, b2)
	B2 = max(a2, b2)
	if B1 == B2 and A1 + A2 == B1:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	if max(a) == max(b):
		if min(a) + min(b) == max(a):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


import math
for _ in range(int(input())):
	(a1, b1) = sorted(map(int, input().split()))
	(a2, b2) = sorted(map(int, input().split()))
	if b1 == b2 and a1 + a2 == b2:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	maxt1 = max(a1, b1)
	maxt2 = max(a2, b2)
	mint1 = min(a1, b1)
	mint2 = min(a2, b2)
	if maxt1 == maxt2 and mint1 + mint2 == maxt1 or (mint1 == mint2 and maxt1 + maxt2 == mint1):
		print('Yes')
	else:
		print('No')


import math
t = int(input())
while t:
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	temp = a1 * b1 + a2 * b2
	if int(math.sqrt(temp)) ** 2 == temp and (a1 == b2 and b1 + a2 == a1 or (a1 == a2 and b1 + b2 == a1) or (b1 == a2 and a1 + b2 == a2) or (b1 == b2 and a1 + a2 == b1)):
		print('Yes')
	else:
		print('No')
	t -= 1


t = input()
t = int(t)
while t > 0:
	line = input()
	i = line.split()
	x1 = int(i[0])
	x2 = int(i[1])
	line = input()
	i = line.split()
	y1 = int(i[0])
	y2 = int(i[1])
	if x1 == y1:
		r = x2 + y2
		if r == x1:
			print('YES')
			t = t - 1
			continue
	if x1 == y2:
		r = x2 + y1
		if r == x1:
			print('YES')
			t = t - 1
			continue
	if x2 == y1:
		r = x1 + y2
		if r == x2:
			print('YES')
			t = t - 1
			continue
	if x2 == y2:
		r = x1 + y1
		if r == x2:
			print('YES')
			t = t - 1
			continue
	print('NO')
	t = t - 1


def slove():
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	m1 = max(a, b)
	n1 = min(a, b)
	m2 = max(c, d)
	n2 = min(c, d)
	if m1 == m2 and n1 + n2 == m1:
		print('Yes')
	else:
		print('No')
T = int(input())
for _ in range(1, T + 1):
	slove()


for i in range(int(input())):
	(a, b) = map(int, input().split())
	(aa, bb) = map(int, input().split())
	if a == aa + b and a == bb or (b == a + bb and b == aa) or (a == aa and b + bb == a) or (b == bb and a + aa == b):
		print('Yes')
	else:
		print('No')


for t in range(int(input())):
	(a, b) = sorted((int(i) for i in input().split()))
	(c, d) = sorted((int(i) for i in input().split()))
	if b == d and a + c == b:
		print('YES')
	else:
		print('NO')


t = int(input())
for ii in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if max(a, b) == max(c, d) and min(a, b) + min(c, d) == max(a, b, c, d):
		print('yes')
	else:
		print('no')


n = int(input())
str = ''
for i in range(n):
	first = [int(x) for x in input().split()]
	second = [int(x) for x in input().split()]
	if first[0] == second[0] and first[0] == first[1] + second[1] or (first[0] == second[1] and first[0] == first[1] + second[0]) or (first[1] == second[0] and first[1] == first[0] + second[1]) or (first[1] == second[1] and first[1] == first[0] + second[0]):
		str += 'Yes'
	else:
		str += 'No'
	if i != n - 1:
		str += '\n'
print(str)


t = int(input())
for _ in range(t):
	l1 = list(map(int, input().split()))
	l2 = list(map(int, input().split()))
	flag = False
	for i in range(2):
		for j in range(2):
			if l1[i] == l2[j]:
				if l1[1 - i] + l2[1 - j] == l1[i]:
					flag = True
	if flag:
		print('Yes')
	else:
		print('No')


t = int(input())
for i1 in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	u1 = max(a1, b1)
	l1 = min(a1, b1)
	u2 = max(a2, b2)
	l2 = min(a2, b2)
	if u1 == u2 and l1 + l2 == u1:
		print('Yes')
	else:
		print('No')


import math
for i in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	(x, y) = (max(a, b), min(a, b))
	(w, z) = (max(c, d), min(c, d))
	if y + z == x == w:
		print('YES')
	else:
		print('NO')


def fun(a, b, c, d):
	if a == b or c == d:
		return False
	if max(a, b) == max(c, d) and min(a, b) + min(c, d) == max(a, b):
		return True
	return False
for _ in range(int(input())):
	(a, b) = list(map(int, input().split()))
	(c, d) = list(map(int, input().split()))
	if fun(a, b, c, d):
		print('Yes')
	else:
		print('No')


i = int(input())
for _ in range(i):
	q = 0
	a1 = list(map(int, input().split()))
	a2 = list(map(int, input().split()))
	for i in a1:
		for j in a2:
			if i == j:
				i_index = a1.index(i)
				j_index = a2.index(j)
				if i_index == 1:
					i_index = 0
				else:
					i_index = 1
				if j_index == 1:
					j_index = 0
				else:
					j_index = 1
				if a1[i_index] + a2[j_index] == i:
					print('YES')
					q = 1
	if q == 1:
		pass
	else:
		print('NO')


n = int(input())
for x in range(n):
	z = True
	(a, b) = map(int, input().strip().split())
	(c, d) = map(int, input().strip().split())
	p = {a, b}
	q = {c, d}
	try:
		k = p.intersection(q)
		k = list(k)
		k = max(k)
	except:
		z = False
	if z == True:
		p.remove(k)
		q.remove(k)
		if sum(p) + sum(q) == k:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


import bisect
from math import pi
from collections import deque
from math import factorial
from math import log, ceil
from collections import defaultdict
from math import *
from sys import stdin, stdout
import itertools
import os
import sys
import threading
from collections import deque, Counter, OrderedDict, defaultdict
from heapq import *
from fractions import Fraction
mod = int(pow(10, 9) + 7)

def ii():
	return int(input())

def si():
	return str(input())

def mi():
	return map(int, input().split())

def li1():
	return list(mi())

def fii():
	return int(stdin.readline())

def fsi():
	return str(stdin.readline())

def fmi():
	return map(int, stdin.readline().split())

def fli():
	return list(fmi())
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)

def make_graph(e):
	d = {}
	for i in range(e):
		(x, y) = mi()
		if x not in d:
			d[x] = [y]
		else:
			d[x].append(y)
		if y not in d:
			d[y] = [x]
		else:
			d[y].append(x)
	return d

def gr2(n):
	d = defaultdict(list)
	for i in range(n):
		(x, y) = mi()
		d[x].append(y)
	return d

def connected_components(graph):
	seen = set()

	def dfs(v):
		vs = set([v])
		component = []
		while vs:
			v = vs.pop()
			seen.add(v)
			vs |= set(graph[v]) - seen
			component.append(v)
		return component
	ans = []
	for v in graph:
		if v not in seen:
			d = dfs(v)
			ans.append(d)
	return ans

def primeFactors(n):
	s = set()
	while n % 2 == 0:
		s.add(2)
		n = n // 2
	for i in range(3, int(sqrt(n)) + 1, 2):
		while n % i == 0:
			s.add(i)
			n = n // i
	if n > 2:
		s.add(n)
	return s

def find_all(a_str, sub):
	start = 0
	while True:
		start = a_str.find(sub, start)
		if start == -1:
			return
		yield start
		start += len(sub)

def SieveOfEratosthenes(n, isPrime):
	isPrime[0] = isPrime[1] = False
	for i in range(2, n):
		isPrime[i] = True
	p = 2
	while p * p <= n:
		if isPrime[p] == True:
			i = p * p
			while i <= n:
				isPrime[i] = False
				i += p
		p += 1
	return isPrime

def dijkstra(edges, f, t):
	g = defaultdict(list)
	for (l, r, c) in edges:
		g[l].append((c, r))
	(q, seen, mins) = ([(0, f, ())], set(), {f: 0})
	while q:
		(cost, v1, path) = heappop(q)
		if v1 not in seen:
			seen.add(v1)
			path = (v1, path)
			if v1 == t:
				return (cost, path)
			for (c, v2) in g.get(v1, ()):
				if v2 in seen:
					continue
				prev = mins.get(v2, None)
				next = cost + c
				if prev is None or next < prev:
					mins[v2] = next
					heappush(q, (next, v2, path))
	return float('inf')

def binsearch(a, l, r, x):
	while l <= r:
		mid = l + (r - 1) // 2
		if a[mid]:
			return mid
		elif a[mid] > x:
			l = mid - 1
		else:
			r = mid + 1
	return -1

def readTree(n):
	adj = [set() for _ in range(n)]
	for _ in range(n - 1):
		(u, v) = map(int, input().split())
		adj[u - 1].add(v - 1)
		adj[v - 1].add(u - 1)
	return adj

def treeOrderByDepth(n, adj, root=0):
	parent = [-2] + [-1] * (n - 1)
	ordered = []
	q = deque()
	q.append(root)
	depth = [0] * n
	while q:
		c = q.popleft()
		ordered.append(c)
		for a in adj[c]:
			if parent[a] == -1:
				parent[a] = c
				depth[a] = depth[c] + 1
				q.append(a)
	return (ordered, parent, depth)
for _ in range(ii()):
	(a, b) = mi()
	(c, d) = mi()
	if a == c and (a == b + d or c == b + d):
		print('Yes')
	elif a == d and (a == b + c or d == b + c):
		print('Yes')
	elif b == c and (b == a + d or c == a + d):
		print('Yes')
	elif b == d and (b == a + c or d == a + c):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	frec = list(map(int, input().split()))
	srec = list(map(int, input().split()))
	if max(frec) == max(srec) and min(frec) + min(srec) == max(frec):
		print('Yes')
	else:
		print('No')


from math import *
from itertools import permutations
for zz in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	(a1, b1) = sorted([a1, b1])
	(a2, b2) = sorted([a2, b2])
	if b1 == b2:
		if a1 + a2 == b1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	b1 = a if a >= b else b
	b2 = c if c >= d else d
	s1 = a if a <= b else b
	s2 = c if c <= d else d
	if b1 == b2 and b1 == s1 + s2:
		print('Yes')
	else:
		print('NO')


test_cases = int(input())
squares = []
i = 1
while i <= test_cases:
	square = 'No'
	rect_1_str = input()
	rect_1_dims = rect_1_str.split(' ')
	rect_1_max = max(int(rect_1_dims[0]), int(rect_1_dims[1]))
	rect_1_min = min(int(rect_1_dims[0]), int(rect_1_dims[1]))
	rect_2_str = input()
	rect_2_dims = rect_2_str.split(' ')
	rect_2_max = max(int(rect_2_dims[0]), int(rect_2_dims[1]))
	rect_2_min = min(int(rect_2_dims[0]), int(rect_2_dims[1]))
	if rect_1_max == rect_2_max and rect_1_min + rect_2_min == rect_1_max:
		square = 'yes'
	squares.append(square)
	i += 1
for square in squares:
	print(square)


t = int(input())
for i in range(t):
	(a, b) = [int(x) for x in input().split()]
	(c, d) = [int(x) for x in input().split()]
	if a == d and b + c == a or (a == c and b + d == a) or (b == c and a + d == c) or (b == d and a + c == d):
		print('Yes')
	else:
		print('No')


t = int(input())
for x in range(t):
	l1 = [int(x) for x in input().split()]
	l1.sort()
	l2 = [int(x) for x in input().split()]
	l2.sort()
	if l1[-1] == l2[-1] and l1[0] + l2[0] == l1[-1]:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	(x, y) = map(int, input().split())
	if a > b:
		a = a + b
		b = a - b
		a = a - b
	if x > y:
		x = x + y
		y = x - y
		x = x - y
	if x + a == b and b == y:
		print('Yes')
	else:
		print('No')


import sys
import bisect
import heapq
from math import *
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
mod = pow(10, 9) + 7

def inp():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def graph(vertex):
	return [[] for i in range(0, vertex + 1)]

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def x(i):
	return i * (i + 1) + i * (i - 1) / 2

def solve():
	(a, b) = sep()
	(x, y) = sep()
	a1 = min(a, b)
	b1 = max(a, b)
	a2 = min(x, y)
	b2 = max(x, y)
	if b1 == b2 and a1 + a2 == b1:
		print('Yes')
	else:
		print('No')
testcase(int(inp()))


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(x, y) = map(int, input().split())
	if a == x and b + y == a or (a == y and b + x == a) or (b == x and a + y == b) or (b == y and a + x == b):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(a1, b1) = map(int, input().split())
	if max(a, b) == max(a1, b1):
		if min(a, b) + min(a1, b1) == max(a, b) or min(a, b) + min(a1, b1) == max(a1, b1):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


test = int(input())
test_arr = []
for _ in range(test):
	(a1, b1) = map(int, filter(None, input().split(' ')))
	(a2, b2) = map(int, filter(None, input().split(' ')))
	if a1 == b1 or a2 == b2:
		test_arr.append('NO')
		continue
	if a1 > b1:
		max1 = a1
		min1 = b1
	else:
		max1 = b1
		min1 = a1
	if a2 > b2:
		max2 = a2
		min2 = b2
	else:
		max2 = b2
		min2 = a2
	if max1 == max2:
		sum_ = min1 + min2
		if sum_ == max1:
			test_arr.append('YES')
			continue
		else:
			test_arr.append('NO')
			continue
	else:
		test_arr.append('NO')
for t in test_arr:
	print(t)


times = int(input())
output = []
for i in range(times):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 < b1:
		(a1, b1) = (b1, a1)
	if a2 < b2:
		(a2, b2) = (b2, a2)
	if a1 != a2:
		output.append('No')
	elif b1 + b2 != a1:
		output.append('No')
	else:
		output.append('Yes')
for ans in output:
	print(ans)


t = int(input())
s = ''
for i in range(0, t):
	(a1, b1) = input().split()
	(a2, b2) = input().split()
	a1 = int(a1)
	b1 = int(b1)
	a2 = int(a2)
	b2 = int(b2)
	p1 = [a1, b1]
	p2 = [a2, b2]
	p1.sort()
	p2.sort()
	if p1[1] == p2[1] and p1[0] + p2[0] == p1[1]:
		s += 'Yes\n'
	else:
		s += 'No\n'
print(s)


t = int(input())
for tc in range(t):
	line = input().split()
	(a, b) = (int(line[0]), int(line[1]))
	line = input().split()
	(x, y) = (int(line[0]), int(line[1]))
	if a == b or x == y:
		print('No')
		continue
	minn = min(a, b) + min(x, y)
	if minn in (x, y) and minn in (a, b):
		print('Yes')
		continue
	print('No')


def main():
	t = int(input())
	for __ in range(t):
		(a, b) = map(int, input().split())
		(c, d) = map(int, input().split())
		if a == c and b + d == c or (a == d and b + c == d) or (b == c and a + d == c or (b == d and a + c == d)):
			print('YES')
		else:
			print('NO')
main()


import math
t = 0
t = int(input())
for i in range(t):
	(a1, b1) = input().split(' ')
	(a2, b2) = input().split(' ')
	a1 = int(a1)
	a2 = int(a2)
	b1 = int(b1)
	b2 = int(b2)
	if a1 == b1 or a2 == b2:
		print('No')
	else:
		l1 = max(a1, b1)
		l2 = max(a2, b2)
		if l1 == l2:
			if l1 == min(a1, b1) + min(a2, b2):
				print('Yes')
				continue
			else:
				print('No')
				continue
		else:
			print('No')


t = int(input())
for i in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	c = 0
	if a1 == a2:
		if b1 + b2 == a1:
			c += 1
	if b1 == a2:
		if a1 + b2 == b1:
			c += 1
	if a1 == b2:
		if a2 + b1 == a1:
			c += 1
	if b1 == b2:
		if a1 + a2 == b1:
			c += 1
	if c > 0:
		print('Yes')
	else:
		print('No')


import math
t = int(input())
for i in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 < b1:
		(a1, b1) = (b1, a1)
	if a2 < b2:
		(a2, b2) = (b2, a2)
	if a1 == a2 and b1 + b2 == a2:
		print('YES')
	else:
		print('NO')


import sys
import math
import bisect

def main():
	for _ in range(int(input())):
		(a, b) = map(int, input().split())
		(c, d) = map(int, input().split())
		if a == c and b + d == a:
			print('YES')
		elif a == d and b + c == a:
			print('YES')
		elif b == c and a + d == b:
			print('YES')
		elif b == d and a + c == b:
			print('YES')
		else:
			print('NO')
main()


for i in range(int(input())):
	l1 = list(map(int, input().split()))
	l2 = list(map(int, input().split()))
	l1.sort()
	l2.sort()
	if l1[-1] != l2[-1]:
		print('NO')
	elif l1[0] + l2[0] == l1[-1]:
		print('YES')
	else:
		print('NO')


import os
import sys
from io import BytesIO, IOBase
import math

def inputIntArray():
	return list(map(int, input().rstrip().split()))

def inputArray():
	return input().rstrip().split()

def inputVars():
	return map(int, input().rstrip().split())

def inputNum():
	return int(input())

def main():
	for _ in range(inputNum()):
		(a, b) = inputVars()
		(c, d) = inputVars()
		if a + c == b == d or a == c == b + d or a == d == b + c or (b == c == a + d):
			print('Yes')
		else:
			print('No')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


for T in range(int(input())):
	(a, b) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	Square = False
	if a == a2:
		Square |= b + b2 == a
	if a == b2:
		Square |= b + a2 == a
	if b == a2:
		Square |= a + b2 == b
	if b == b2:
		Square |= a + a2 == b
	print('Yes' if Square else 'No')


for _ in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 + a2 == b1 == b2 or b1 + b2 == a1 == a2 or a1 + b2 == b1 == a2 or (a2 + b1 == a1 == b2):
		print('yes')
	else:
		print('no')


for _ in range(int(input())):
	n1 = [int(i) for i in input().split()]
	n2 = [int(i) for i in input().split()]
	a = ['no']
	for i in n1:
		for j in n2:
			if i == j:
				if 3 * i == sum(n1) + sum(n2):
					a.append('yes')
				else:
					a.append('no')
	a.sort()
	print(a[len(a) - 1])


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	f = 0
	if a == c == b + d:
		f = 1
	elif a == d == b + c:
		f = 1
	elif b == c == a + d:
		f = 1
	elif b == d == a + c:
		f = 1
	print('YES' if f else 'NO')


for i in range(int(input())):
	(a, b) = map(int, input().split(' '))
	(c, d) = map(int, input().split(' '))
	if a > b:
		pass
	else:
		temp = a
		a = b
		b = temp
	if c > d:
		pass
	else:
		temp = c
		c = d
		d = temp
	if b + d == a and b + d == c:
		print('YES')
	else:
		print('No')


t = int(input())
for test in range(t):
	(n, m) = list(map(int, input().split()))
	(n2, m2) = list(map(int, input().split()))
	(n, m) = (min(n, m), max(n, m))
	(n2, m2) = (min(n2, m2), max(n2, m2))
	if n + n2 == m == m2:
		print('YES')
	else:
		print('NO')


t = int(input())
max1 = ''
max2 = ''
square = 'No'
for i in range(0, t):
	c = []
	max1 = input()
	max2 = input()
	max1 += ' ' + max2
	c = max1.split(' ')
	if c[0] == c[1] or c[2] == c[3]:
		square = 'No'
		print(square)
	else:
		c[0] = int(c[0])
		c[1] = int(c[1])
		c[2] = int(c[2])
		c[3] = int(c[3])
		c.sort()
		if c[2] == c[3]:
			if c[0] + c[1] == c[3]:
				square = 'Yes'
				print(square)
			else:
				square = 'No'
				print(square)
		else:
			square = 'No'
			print(square)


T = int(input())
for tc in range(T):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	max1 = max(a1, b1)
	min1 = min(a1, b1)
	max2 = max(a2, b2)
	min2 = min(a2, b2)
	if max1 == max2 and min1 + min2 == max1:
		print('YES')
	else:
		print('NO')


def process_test_case(i_test):
	(a1, b1) = map(int, input().split())
	if b1 < a1:
		(a1, b1) = (b1, a1)
	(a2, b2) = map(int, input().split())
	if b2 < a2:
		(a2, b2) = (b2, a2)
	out = 'No'
	if b1 == b2 and a1 + a2 == b1:
		out = 'Yes'
	print(out)
	return None
n_tests = int(input())
for i_test in range(1, n_tests + 1):
	process_test_case(i_test)


from math import ceil, sqrt, floor
cases = int(input())
for _ in range(cases):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	l1 = sorted([a1, b1])
	l2 = sorted([a2, b2])
	if a1 * b1 + a2 * b2 == pow(max(a1, b1), 2) and l1[1] == l2[1]:
		print('Yes')
	else:
		print('No')


def solution(a1, b1, a2, b2):
	if a1 + b2 == b1 and b1 == a2:
		return 'Yes'
	if a1 + a2 == b2 and b1 == b2:
		return 'Yes'
	if b1 + b2 == a1 and a1 == a2:
		return 'Yes'
	if b1 + a2 == a1 and a1 == b2:
		return 'Yes'
	return 'No'
for i in range(int(input())):
	(a1, b1) = [int(x) for x in input().split(' ')]
	(a2, b2) = [int(x) for x in input().split(' ')]
	print(solution(a1, b1, a2, b2))


import math
import sys

def parse_next_line():
	test_str = sys.stdin.readline()
	(x_str, y_str) = test_str.split(' ')
	x = int(x_str)
	y = int(y_str)
	return (x, y)

def check(a1, a2, b1, b2):
	surf = a1 * b1 + a2 * b2
	side = math.sqrt(surf)
	if a1 != side and b1 != side:
		return False
	if a2 != side and b2 != side:
		return False
	if a1 != side:
		return check(b1, a2, a1, b2)
	if a2 != side:
		return check(a1, b2, b1, a2)
	assert a1 == side
	assert a2 == side
	return b1 + b2 == side

def main(_):
	num_inputs = int(sys.stdin.readline())
	for _ in range(num_inputs):
		(a1, b1) = parse_next_line()
		(a2, b2) = parse_next_line()
		if check(a1, a2, b1, b2):
			print('Yes')
		else:
			print('No')
main(sys.argv[1:])


def main():
	t = int(input())
	for _ in range(t):
		(x, y) = map(int, input().split())
		(a, b) = map(int, input().split())
		if x == a:
			if y + b == x:
				print('Yes')
				continue
		if x == b:
			if y + a == x:
				print('Yes')
				continue
		if y == a:
			if x + b == a:
				print('Yes')
				continue
		if y == b:
			if x + a == b:
				print('Yes')
				continue
		print('No')
	return
main()


from math import *
t = int(input())
for _ in range(t):
	(n, p) = map(int, input().split())
	(a, b) = map(int, input().split())
	if n > p:
		(n, p) = (p, n)
	if a > b:
		(a, b) = (b, a)
	if b != p:
		print('NO')
	elif n + a != b:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	(x1, y1) = (min(a1, b1), max(a1, b1))
	(x2, y2) = (min(a2, b2), max(a2, b2))
	if y1 == y2 and x1 + x2 == y1:
		print('YES')
	else:
		print('NO')


t = int(input())
for q in range(t):
	[m1, n1] = [int(x) for x in input().split()]
	[n2, m2] = [int(x) for x in input().split()]
	res = 'No'
	if m1 == m2 and m1 == n1 + n2 or (n1 == n2 and n1 == m1 + m2):
		res = 'yes'
	(m2, n2) = (n2, m2)
	if m1 == m2 and m1 == n1 + n2 or (n1 == n2 and n1 == m1 + m2):
		res = 'Yes'
	print(res)


for t in range(int(input())):
	(a, b) = sorted(map(int, input().split()))
	(c, d) = sorted(map(int, input().split()))
	if a + c == b and b == d:
		print('yes')
	else:
		print('no')


F = lambda : map(int, input().split())
for _ in range(int(input())):
	(a, b) = F()
	(c, d) = F()
	print('Yes' if max(a, b) == max(c, d) == min(a, b) + min(c, d) else 'No')


t = int(input())
for i in range(0, t):
	(a, b) = list(map(int, input().split()))
	(c, d) = list(map(int, input().split()))
	e = max(a, b)
	f = max(c, d)
	if e == f:
		g = min(a, b)
		h = min(c, d)
		if g + h == e:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


import sys
from math import sqrt, floor, factorial, gcd
from collections import Counter
inp = sys.stdin.readline
read = lambda : list(map(int, inp().strip().split()))
ans = ''
for _ in range(int(inp())):
	(a1, b1) = read()
	(a2, b2) = read()
	a = a1 * b1
	b = a2 * b2
	arr = sorted([a1, a2, b1, b2])
	if int(sqrt(a + b)) ** 2 == a + b and int(sqrt(a + b)) == arr[-1] and (arr[-1] == arr[-2]):
		ans += 'YES\n'
	else:
		ans += 'NO\n'
print(ans)


import sys
buff_readline = sys.stdin.buffer.readline
readline = sys.stdin.readline
INF = 2 ** 62 - 1

def read_int():
	return int(buff_readline())

def read_int_n():
	return list(map(int, buff_readline().split()))

def read_float():
	return float(buff_readline())

def read_float_n():
	return list(map(float, buff_readline().split()))

def read_str():
	return readline().strip()

def read_str_n():
	return readline().strip().split()

def error_print(*args):
	print(*args, file=sys.stderr)

def mt(f):
	import time

	def wrap(*args, **kwargs):
		s = time.time()
		ret = f(*args, **kwargs)
		e = time.time()
		error_print(e - s, 'sec')
		return ret
	return wrap

@mt
def slv(A1, B1, A2, B2):
	(A1, B1) = (min(A1, B1), max(A1, B1))
	(A2, B2) = (min(A2, B2), max(A2, B2))
	if B1 == B2 and A1 + A2 == B1:
		return 'Yes'
	return 'No'

def main():
	T = read_int()
	for _ in range(T):
		(A1, B1) = read_int_n()
		(A2, B2) = read_int_n()
		print(slv(A1, B1, A2, B2))
main()


t = int(input())
l = []
for i in range(t):
	(a1s, b1s) = list(input().split())
	(a1, b1) = (int(a1s), int(b1s))
	(a2s, b2s) = list(input().split())
	(a2, b2) = (int(a2s), int(b2s))
	if a1 == a2 and b1 + b2 == a1 or (b1 == b2 and a1 + a2 == b1) or (a1 == b2 and a2 + b1 == a1) or (a2 == b1 and a1 + b2 == a2):
		l.append('Yes')
	else:
		l.append('No')
for i in l:
	print(i)


n = int(input())
for _ in range(n):
	(a, b) = [int(i) for i in input().split()]
	(c, d) = [int(i) for i in input().split()]
	if a + c == b == d or a + d == b == c or b + c == a == d or (b + d == a == c):
		print('Yes')
	else:
		print('No')


n = int(input())
import math

def func(n):
	for i in range(n):
		(a, b) = map(int, input().split())
		(c, d) = map(int, input().split())
		if (a + b + c + d) / 3 == math.sqrt(a * b + c * d) and max(a, b) == max(c, d):
			print('YES')
		else:
			print('NO')
func(n)


t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	if a < b:
		(a, b) = (b, a)
	(a2, b2) = map(int, input().split())
	if a2 < b2:
		(a2, b2) = (b2, a2)
	print('Yes' if a == a2 and a == b + b2 else 'No')


for _ in range(int(input())):
	(a, b) = [int(j) for j in input().split()]
	(c, d) = [int(j) for j in input().split()]
	if a == d and c + b == a:
		print('YES')
	elif a == c and b + d == a:
		print('YES')
	elif b == c and a + d == b:
		print('YES')
	elif b == d and c + a == b:
		print('YES')
	else:
		print('NO')


t = int(input())
for test in range(t):
	a = list(sorted(map(int, input().split())))
	b = list(sorted(map(int, input().split())))
	if a[0] + b[0] == a[1] and a[0] + b[0] == b[1]:
		print('YES')
	else:
		print('NO')


noInputs = int(input())
for i in range(noInputs):
	(dim1, dim2) = input().split()
	min1 = min(int(dim1), int(dim2))
	max1 = max(int(dim1), int(dim2))
	(dim1, dim2) = input().split()
	min2 = min(int(dim1), int(dim2))
	max2 = max(int(dim1), int(dim2))
	if min1 + min2 == max1 and max1 == max2:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(a1, b1) = input().split()
	(a2, b2) = input().split()
	a1 = int(a1)
	a2 = int(a2)
	b1 = int(b1)
	b2 = int(b2)
	c = max(a1, b1)
	d = max(a2, b2)
	e = min(a1, b1)
	f = min(a2, b2)
	if c == d:
		if e + f == c:
			ans = 'YES'
			print(ans)
		else:
			ans = 'NO'
			print(ans)
	else:
		ans = 'NO'
		print(ans)


t = int(input())
for i in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	p = max(a1, b1)
	q = min(a1, b1)
	a1 = q
	b1 = p
	p = max(a2, b2)
	q = min(a2, b2)
	a2 = q
	b2 = p
	f = 0
	if b2 == b1:
		if a1 + a2 == b2:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for _ in range(int(input())):
	(x, y) = map(int, input().split())
	l1 = max(x, y)
	w1 = min(x, y)
	(x, y) = map(int, input().split())
	l2 = max(x, y)
	w2 = min(x, y)
	if l1 == l2:
		if w1 + w2 == l2:
			print('YES')
		else:
			print('NO')
	elif w1 == w2:
		if l1 + l2 == w2:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for i in range(t):
	first = list(map(int, input().split()))
	second = list(map(int, input().split()))
	if first[0] + second[0] == first[1] and first[1] == second[1]:
		print('YES')
	elif first[0] + second[1] == first[1] and first[1] == second[0]:
		print('YES')
	elif first[1] + second[0] == first[0] and first[0] == second[1]:
		print('YES')
	elif first[1] + second[1] == first[0] and first[0] == second[0]:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	q = list(input().split(' '))
	w = list(input().split(' '))
	for i in range(len(q)):
		q[i] = int(q[i])
		w[i] = int(w[i])
	q.sort()
	w.sort()
	if q[1] == w[1] == q[0] + w[0]:
		print('YES')
	else:
		print('No')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	f = 0
	if a == c and b + d == a:
		f = 1
	elif a == d and b + c == a:
		f = 1
	elif b == c and a + d == b:
		f = 1
	elif b == d and a + c == b:
		f = 1
	print(['No', 'Yes'][f == 1])


for _ in range(int(input())):
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	print('Yes' if max(a) == max(b) and min(a) + min(b) == max(a) else 'No')


import math
t = int(input())
for i in range(t):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	if max(a) != max(b):
		print('NO')
	elif min(a) + min(b) != max(a):
		print('NO')
	else:
		print('YES')


n = int(input())
for _ in range(n):
	a = sorted(list(map(int, input().split())))
	b = sorted(list(map(int, input().split())))
	if a[1] != b[1] or a[0] + b[0] != a[1]:
		print('No')
	else:
		print('Yes')


from sys import stdin, stdout
n = int(stdin.readline())

class Rectangle:

	def __init__(self, length, width):
		self.length = length
		self.width = width
for _ in range(n):
	(a, b) = map(int, stdin.readline().split())
	(c, d) = map(int, stdin.readline().split())
	A = Rectangle(a, b)
	B = Rectangle(c, d)
	if A.length + B.length == B.width and B.width == A.width:
		stdout.write('Yes\n')
	elif A.length + B.width == B.length and B.length == A.width:
		stdout.write('Yes\n')
	elif A.width + B.length == A.length and A.length == B.width:
		stdout.write('Yes\n')
	elif A.width + B.width == A.length and A.length == B.length:
		stdout.write('Yes\n')
	else:
		stdout.write('No\n')


t = int(input())
for i in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	num = a1 * b1 + a2 * b2
	if int(num ** 0.5) ** 2 == num and max(a1, b1) == max(a2, b2) and (max(a2, b2) == int(num ** 0.5)):
		print('Yes')
	else:
		print('No')


import sys
for t in range(int(sys.stdin.readline())):
	(a, b) = map(int, sys.stdin.readline().split())
	(x, y) = map(int, sys.stdin.readline().split())
	(a, b) = (min(a, b), max(a, b))
	(x, y) = (min(x, y), max(x, y))
	if b == y and b == a + x:
		sys.stdout.write('Yes\n')
	else:
		sys.stdout.write('No\n')


for _ in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 > b1:
		(a1, b1) = (b1, a1)
	if a2 > b2:
		(a2, b2) = (b2, a2)
	flag = False
	if a1 == a2 and a1 == b1 + b2:
		flag = True
	if b1 == b2 and b1 == a1 + a2:
		flag = True
	print('Yes' if flag else 'No')


for _ in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	l1 = [a1, b1]
	l2 = [a2, b2]
	l1.sort()
	l2.sort()
	if l1[0] + l2[0] == l2[1] and l2[1] == l1[1]:
		print('Yes')
	else:
		print('No')


def reordena(a, b):
	if a < b:
		(a, b) = (b, a)
	return (a, b)

def cuadrados(lado_1_c1, lado_1_c2, lado_2_c1, lado_2_c2):
	(lado_1_c1, lado_2_c1) = reordena(lado_1_c1, lado_2_c1)
	(lado_1_c2, lado_2_c2) = reordena(lado_1_c2, lado_2_c2)
	if lado_1_c1 == lado_1_c2 and lado_2_c1 + lado_2_c2 == lado_1_c1:
		print('YES')
	else:
		print('NO')

def main():
	número_de_casos = int(input())
	for a in range(1, número_de_casos + 1):
		primer_rectángulo = input().strip().split(' ')
		segundo_rectángulo = input().strip().split(' ')
		lado_1_c1 = int(primer_rectángulo[0])
		lado_2_c1 = int(primer_rectángulo[1])
		lado_1_c2 = int(segundo_rectángulo[0])
		lado_2_c2 = int(segundo_rectángulo[1])
		cuadrados(lado_1_c1, lado_1_c2, lado_2_c1, lado_2_c2)
main()


t = int(input())
for _ in range(t):
	(a1, a2) = one = list(map(int, input().split()))
	(b1, b2) = two = list(map(int, input().split()))
	if a1 + b1 == a2 == b2:
		print('Yes')
	elif a1 + b2 == a2 == b1:
		print('Yes')
	elif a2 + b1 == a1 == b2:
		print('Yes')
	elif a2 + b2 == a1 == b1:
		print('Yes')
	else:
		print('No')


t = int(input())
for tt in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	l1 = max(a1, b1)
	w1 = min(a1, b1)
	l2 = max(a2, b2)
	w2 = min(a2, b2)
	ans = 'NO'
	if l1 == l2:
		if l1 == w1 + w2:
			ans = 'YES'
	print(ans)


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	ans = False
	if a == c:
		if b + d == a:
			ans = True
	if a == d:
		if c + b == a:
			ans = True
	if b == c:
		if a + d == b:
			ans = True
	if b == d:
		if c + a == b:
			ans = True
	if ans:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	lst = []
	lst.append(a)
	lst.append(b)
	lst.append(c)
	lst.append(d)
	lst.sort()
	if (a + b + c + d) % 3 == 0 and max(a, b) == max(c, d) and (2 * (lst[0] + lst[1]) == lst[2] + lst[3]):
		print('YES')
	else:
		print('NO')


for tt in range(int(input())):
	x = [int(i) for i in input().split()]
	y = [int(i) for i in input().split()]
	if max(x) != max(y):
		print('No')
	elif min(x) + min(y) == max(x):
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout
from collections import defaultdict, deque
import operator
import bisect
mod = 10 ** 9 + 7

def input_nums():
	return list(map(int, stdin.readline().split()))

def input_array():
	return list(map(int, stdin.readline().split()))

def output_num(ans):
	return stdout.write(str(ans) + ' ')

def main():
	t = int(stdin.readline())
	for _ in range(t):
		(a, b) = input_nums()
		(c, d) = input_nums()
		o = min(a, b)
		t = min(c, d)
		if max(a, b) == max(c, d):
			if o + t == max(a, b):
				print('Yes')
			else:
				print('No')
		else:
			print('No')
main()


t = int(input())
for case in range(t):
	a = [int(x) for x in input().split(' ')]
	a.sort()
	b = [int(x) for x in input().split(' ')]
	b.sort()
	if b[1] == a[1] == a[0] + b[0]:
		ans = 'Yes'
	else:
		ans = 'No'
	print(ans)


t = list(map(int, input().strip().split()))[0]
for i in range(t):
	(a1, b1) = list(map(int, input().strip().split()))
	(a2, b2) = list(map(int, input().strip().split()))
	l = max(a1, b1)
	b = max(a2, b2)
	l_dash = min(a1, b1)
	b_dash = min(a2, b2)
	if l == b and l_dash + b_dash == l:
		print('Yes')
	else:
		print('No')


b = int(input())
b = b * 2
a = []
e = 0
for d in range(b):
	c = [int(i) for i in input().split()]
	a = a + [c]
for i in range(1, b, 2):
	e = min(a[i - 1]) + min(a[i])
	if max(a[i]) == max(a[i - 1]):
		if max(a[i]) == e:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for case in range(int(input())):
	(a1, b1) = [int(a) for a in input().split()]
	(a2, b2) = [int(a) for a in input().split()]
	if a1 == a2 and b1 + b2 == a1:
		print('YES')
	elif a1 == b2 and b1 + a2 == a1:
		print('YES')
	elif b1 == a2 and a1 + b2 == b1:
		print('YES')
	elif b1 == b2 and a1 + a2 == b1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	print('YES' if min(a, b) + min(c, d) == max(a, b) == max(c, d) else 'NO')


t = int(input())
for i in range(t):
	(a1, b1) = list(map(int, input().split()))
	(a2, b2) = list(map(int, input().split()))
	l1 = min(a1, b1)
	l2 = min(a2, b2)
	h1 = max(a1, b1)
	h2 = max(a2, b2)
	if h1 == h2 and l1 + l2 == h1:
		print('Yes')
	else:
		print('No')


n = int(input())
for x in range(n):
	(first_1st, first_2nd) = input().split()
	(second_1st, second_2nd) = input().split()
	list_1 = [int(first_1st), int(first_2nd)]
	list_2 = [int(second_1st), int(second_2nd)]
	flag = 'No'
	for i in range(2):
		if list_1[i] in list_2:
			list_3 = list_2.copy()
			list_3.remove(list_1[i])
			if list_1[1 - i] + list_3[0] == list_1[i]:
				flag = 'Yes'
	print(flag)


for _ in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	m = max(a1, b1, a2, b2)
	if m in (a2, b2) and m in (a1, b1):
		k = (a1 * b1 + a2 * b2) ** (1 / 2)
		if int(k) == k:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for _ in range(int(input())):
	(l1, w1) = sorted(map(int, input().split()))
	(l2, w2) = sorted(map(int, input().split()))
	res = str('YES') if w1 == w2 and l1 + l2 == w1 else str('NO')
	print(res)


from sys import stdin, stdout
input = stdin.readline
print = stdout.write
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a + c == d == b or a + d == c == b or b + c == d == a or (b + d == c == a):
		print('Yes\n')
	else:
		print('No\n')


for _ in range(int(input())):
	(a, b) = sorted(list(map(int, input().split())))
	(x, y) = sorted(list(map(int, input().split())))
	if a + x == b == y:
		print('YES')
	else:
		print('NO')


def io():
	return map(int, input().split())

def op():
	return list(map(int, input().split()))

def kl(con, x=0):
	if x == 0:
		print('Yes') if con else print('No')
	elif x == 1:
		print('yes') if con else print('no')
	elif x == 2:
		print('YES') if con else print('NO')
MOD = 1000000007
MAX = 2147483647
MIN = -2147483648
i = input
for _ in range(int(i())):
	(a, b) = io()
	(c, d) = io()
	x = a == c and a == b + d or (a == d and a == b + c) or (b == c and b == a + d) or (b == d and b == a + c)
	kl(x)


ii = lambda : int(input())
f = lambda : map(int, input().split())
from collections import *
for _ in range(ii()):
	(a, b) = f()
	(c, d) = f()
	if a + c == b == d or a + d == c == b or b + c == d == a or (b + d == a == c):
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a < b:
		temp = a
		a = b
		b = temp
	if c < d:
		temp = c
		c = d
		d = temp
	if b + d == a and a == c:
		print('Yes')
	else:
		print('No')


def square(lis1, lis2):
	k = max(lis1)
	if max(lis2) != k:
		return 'No'
	if k not in lis1:
		return 'Yes'
	if k not in lis2:
		return 'No'
	del lis1[lis1.index(k)]
	del lis2[lis2.index(k)]
	if lis1[0] + lis2[0] != k:
		return 'No'
	return 'Yes'
k = int(input())
for i in range(0, k):
	lis1 = list(map(int, input().split()))
	lis2 = list(map(int, input().split()))
	print(square(lis1, lis2))


t = int(input())

def is_square(c1, c2):
	if c1[0] == c2[0]:
		index = [0, 0]
	elif c1[0] == c2[1]:
		index = [0, 1]
	elif c1[1] == c2[0]:
		index = [1, 0]
	else:
		index = [1, 1]
	c1.pop(index[0])
	temp = c2.pop(index[1])
	return 'YES' if c1[0] + c2[0] == temp else 'NO'
ans = []
for i in range(t):
	cord1 = list(map(int, input().split()))
	cord2 = list(map(int, input().split()))
	ans.append(is_square(sorted(cord1, reverse=True), sorted(cord2, reverse=True)))
for item in ans:
	print(item)


from itertools import combinations
t = int(input())
for i in range(t):
	(a1, b1) = input().split()
	(a2, b2) = input().split()
	f = 0
	if a1 == a2:
		if int(a1) == int(b1) + int(b2):
			print('YES')
			f = 1
	if a1 == b2:
		if int(a1) == int(a2) + int(b1):
			print('YES')
			f = 1
	if b1 == a2:
		if int(b1) == int(a1) + int(b2):
			print('YES')
			f = 1
	if b1 == b2:
		if int(b1) == int(a2) + int(a1):
			print('YES')
			f = 1
	if f == 0:
		print('NO')


for k in range(int(input())):
	(a, b) = list(map(int, input().split()))
	(c, d) = list(map(int, input().split()))
	if a == c and b + d == a:
		print('YES')
	elif a == d and b + c == a:
		print('YES')
	elif b == c and a + d == b:
		print('YES')
	elif b == d and a + c == b:
		print('YES')
	else:
		print('NO')


from math import sqrt as s
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	(a, b) = (max(a, b), min(a, b))
	(c, d) = (max(c, d), min(c, d))
	total = a + b + c + d
	temp = -1
	if a == c:
		total = total - a - c
		temp = a
	elif a == d:
		total = total - a - d
		temp = a
	elif b == c:
		total = total - b - c
		temp = b
	elif b == d:
		total = total - b - d
		temp = b
	if total == temp:
		print('YES')
	else:
		print('NO')


t = int(input())
ans = []
for i in range(t):
	(a1, b1) = [int(i) for i in input().split()]
	(a2, b2) = [int(i) for i in input().split()]
	if max(a1, b1) == max(a2, b2):
		if min(a1, b1) + min(a2, b2) == max(a1, b1):
			ans.append('YES')
		else:
			ans.append('NO')
	else:
		ans.append('NO')
for i in ans:
	print(i)


numTest = int(input())
for _ in range(numTest):
	inputLine = input()
	tempStr = inputLine.split(' ')
	maxA = int(tempStr[0]) if int(tempStr[0]) >= int(tempStr[1]) else int(tempStr[1])
	minA = int(tempStr[0]) if int(tempStr[0]) < int(tempStr[1]) else int(tempStr[1])
	inputLine = input()
	tempStr = inputLine.split(' ')
	maxB = int(tempStr[0]) if int(tempStr[0]) >= int(tempStr[1]) else int(tempStr[1])
	minB = int(tempStr[0]) if int(tempStr[0]) < int(tempStr[1]) else int(tempStr[1])
	if maxA == minA or maxB == minB:
		print('No')
	else:
		isValid = False
		if maxA == maxB:
			isValid = True if minA + minB == maxA else False
		print('Yes' if isValid else 'No')


q = int(input())
for _ in range(q):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	can = False
	if a == c:
		if a == b + d:
			can = True
	if a == d:
		if a == b + c:
			can = True
	if b == c:
		if b == a + d:
			can = True
	if b == d:
		if b == a + c:
			can = True
	print('YES' if can else 'NO')


t = int(input())
for i in range(t):
	i = input().split()
	a1 = int(i[0])
	b1 = int(i[1])
	i = input().split()
	a2 = int(i[0])
	b2 = int(i[1])
	if a1 == a2 and b1 + b2 == a1:
		print('Yes')
	elif a1 == b2 and b1 + a2 == a1:
		print('Yes')
	elif b1 == a2 and a1 + b2 == b1:
		print('Yes')
	elif b1 == b2 and a1 + a2 == b1:
		print('Yes')
	else:
		print('No')


import math
t = int(input())
while t:
	t -= 1
	found = False
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	for i in range(2):
		for j in range(2):
			if a[i] == b[j] and a[1 - i] + b[1 - j] == a[i]:
				found = True
				break
	if found:
		print('Yes')
	else:
		print('No')


import sys
input = sys.stdin.readline
for t in range(int(input())):
	(x, y) = map(int, input().split())
	original = max(x, y)
	(a, b) = map(int, input().split())
	result = False
	if a == original:
		if x == original:
			if y + b == x:
				result = True
		elif y == original:
			if x + b == y:
				result = True
	elif b == original:
		if x == original:
			if y + a == x:
				result = True
		elif y == original:
			if x + a == y:
				result = True
	if result:
		print('Yes')
	else:
		print('No')


def Square(n, m, l, s):
	lista = [n, m, l, s]
	lista = sorted(lista)
	if n != m and l != s and (lista[2] == lista[3]) and (lista[0] + lista[1] == lista[2]):
		return 'YES'
	return 'NO'
Lista = []
total = int(input())
for i in range(total * 2):
	All = [int(i) for i in input().split()]
	Lista.append(All)
j = 0
while j < len(Lista):
	print(Square(Lista[j][0], Lista[j][1], Lista[j + 1][0], Lista[j + 1][1]))
	j += 2


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	j = -1
	if a == c:
		if b + d == c:
			j = 0
	if a == d:
		if b + c == d:
			j = 0
	if b == c:
		if a + d == c:
			j = 0
	if b == d:
		if a + c == d:
			j = 0
	if j == 0:
		print('YES')
	else:
		print('No')


cases = int(input())
l = []
for case in range(cases):
	(a, b) = input().split(' ')
	(c, d) = input().split(' ')
	length = len({a, b, c, d})
	if max(int(a), int(b)) == max(int(c), int(d)) and min(int(a), int(b)) + min(int(c), int(d)) == max(int(c), int(d)):
		l.append('YES')
	else:
		l.append('NO')
for i in l:
	print(i)


T = input()
T = int(T)
for i in range(0, T):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a < b:
		(a, b) = (b, a)
	if c < d:
		(c, d) = (d, c)
	if a == c and b + d == a:
		print('YES')
	else:
		print('NO')


import math
cases = int(input())
all_cases = [input() for i in range(cases * 2)]
grouped = [all_cases[x:x + 2] for x in range(0, len(all_cases), 2)]

def is_square(grouped):
	for i in grouped:
		first_rect = [*map(lambda x: int(x), i[0].split())]
		second_rect = [*map(lambda x: int(x), i[1].split())]
		if max(first_rect) != max(second_rect):
			print('No')
		else:
			sum_area = first_rect[0] * first_rect[1] + second_rect[0] * second_rect[1]
			root = math.sqrt(sum_area)
			if root > int(root):
				print('No')
			else:
				print('Yes')
is_square(grouped)


for t in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if b1 == b2 and a1 + a2 == b1 or (a1 == a2 and b1 + b2 == a1) or (b1 == a2 and a1 + b2 == b1) or (a1 == b2 and a2 + b1 == a1):
		ans = 'yes'
	else:
		ans = 'no'
	print(ans)


t = input()
for i in range(int(t)):
	a = input().split()
	b = input().split()
	x = int(a[0]) * int(a[1]) + int(b[0]) * int(b[1])
	y = max(int(a[0]), int(a[1]))
	z = max(int(b[0]), int(b[1]))
	if x ** (1 / 2) % 1 == 0 and (y * z) ** (1 / 2) == x ** (1 / 2):
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	a = input()
	b = input()
	a1 = int(a.split(' ')[0])
	b1 = int(a.split(' ')[1])
	a2 = int(b.split(' ')[0])
	b2 = int(b.split(' ')[1])
	if a1 > b1:
		a1 = a1 + b1
		b1 = a1 - b1
		a1 = a1 - b1
	if a2 > b2:
		a2 = a2 + b2
		b2 = a2 - b2
		a2 = a2 - b2
	if a1 + a2 == b2 and b2 == b1:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	result = False
	if a1 == a2:
		result = result or a1 == b1 + b2
	if a1 == b2:
		result = result or a1 == b1 + a2
	if b1 == a2:
		result = result or b1 == a1 + b2
	if b1 == b2:
		result = result or b1 == a1 + a2
	print('YES' if result else 'NO')


for _ in range(int(input())):
	a = list((int(x) for x in input().split()))
	b = list((int(x) for x in input().split()))
	a.sort()
	b = sorted(b, reverse=True)
	if a[0] + b[1] == b[0] and b[0] == a[1]:
		print('YES')
	else:
		print('NO')


def solve():
	(a, b) = [int(x) for x in input().split()]
	(c, d) = [int(x) for x in input().split()]
	if b == c and a + d == b:
		print('YES')
	elif a == d and b + c == d:
		print('YES')
	elif a == c and b + d == c:
		print('YES')
	elif b == d and a + c == b:
		print('YES')
	else:
		print('NO')
t = int(input())
for i in range(t):
	solve()


def read_int():
	return int(input())

def read_ints():
	return map(int, input().split(' '))
t = read_int()
for case_num in range(t):
	a = list(read_ints())
	b = list(read_ints())
	ok = False
	for i in range(2):
		for j in range(2):
			if a[i] != b[j]:
				continue
			if a[1 - i] + b[1 - j] == a[i]:
				ok = True
	print('Yes' if ok else 'No')


for _ in range(int(input())):
	(a1, b1) = list(map(int, input().split()))
	(a2, b2) = list(map(int, input().split()))
	if b1 > a1:
		(a1, b1) = (b1, a1)
	if b2 > a2:
		(a2, b2) = (b2, a2)
	if a1 == b1 + b2 and a1 == a2:
		print('YES')
	else:
		print('NO')


tc = int(input())
while tc > 0:
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	print('Yes' if max(a1, b1) == max(a2, b2) and min(a1, b1) + min(a2, b2) == max(a1, b1) else 'No')
	tc -= 1


t = int(input())
answer = bool
while t > 0:
	answer = 0
	t -= 1
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 == a2:
		if b1 + b2 == a1:
			answer = 1
	if a1 == b2:
		if b1 + a2 == a1:
			answer = 1
	if b1 == a2:
		if a1 + b2 == b1:
			answer = 1
	if b1 == b2:
		if a1 + a2 == b1:
			answer = 1
	if answer:
		print('Yes')
	else:
		print('No')


import sys, random
from bisect import bisect_left, bisect_right
input = sys.stdin.readline

def main():
	inf = 10 ** 20
	t = int(input())
	for _ in range(1, t + 1):
		ab = [[int(x) for x in input().split()] for i in range(2)]
		ok = 1
		if ab[0][0] == ab[1][0]:
			ok = 1
		elif ab[0][0] == ab[1][1]:
			(ab[1][0], ab[1][1]) = (ab[1][1], ab[1][0])
		elif ab[0][1] == ab[1][0]:
			(ab[0][0], ab[0][1]) = (ab[0][1], ab[0][0])
		elif ab[0][1] == ab[1][1]:
			(ab[0][0], ab[0][1]) = (ab[0][1], ab[0][0])
			(ab[1][0], ab[1][1]) = (ab[1][1], ab[1][0])
		else:
			ok = 0
		ok1 = 0
		if ab[0][0] == ab[1][0] and ab[0][0] == ab[0][1] + ab[1][1]:
			ok1 = 1
		if ab[0][1] == ab[1][1] and ab[0][1] == ab[0][0] + ab[1][0]:
			ok1 = 1
		if ok and ok1:
			print('YES')
		else:
			print('NO')
main()


def vasya(test):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	max1 = max(a1, b1)
	max2 = max(a2, b2)
	min1 = min(a1, b1)
	min2 = min(a2, b2)
	sumk = min1 + min2
	if max1 == max2 and max1 == sumk:
		return 'Yes'
	else:
		return 'No'
t = int(input())
while t:
	t = t - 1
	print(vasya(t))


t = int(input())
for _ in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	flag = False
	if a1 == a2 and b1 + b2 == a1:
		flag = True
	elif a1 == b2 and b1 + a2 == a1:
		flag = True
	elif b1 == a2 and a1 + b2 == b1:
		flag = True
	elif b1 == b2 and a1 + a2 == b1:
		flag = True
	else:
		flag = False
	if flag:
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout

def main():
	t = int(stdin.readline())
	ans = []
	for j in range(t):
		(x1, y1) = sorted(map(int, stdin.readline().rstrip().split(' ')))
		(x2, y2) = sorted(map(int, stdin.readline().rstrip().split(' ')))
		if y1 + y2 == x1 and x1 == x2:
			ans.append('Yes')
			continue
		if y1 + x2 == x1 and x1 == y2:
			ans.append('Yes')
			continue
		if x1 + y2 == y1 and y1 == x2:
			ans.append('Yes')
			continue
		if x1 + x2 == y1 and y1 == y2:
			ans.append('Yes')
			continue
		ans.append('No')
	stdout.write('\n'.join(ans))
main()


def f(a, b, c, d):
	if a + c == b and a + c == d or (b + c == a and b + c == d) or (a + d == b and a + d == c) or (b + d == a and b + d == c):
		return 'Yes'
	else:
		return 'No'
solve = []
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	solve.append(f(a, b, c, d))
for i in solve:
	print(i)


from math import ceil
from math import floor
from math import sqrt
from math import log

def mod_expo(n, p, m):
	result = 1
	while p != 0:
		if p % 2 == 1:
			result = result * n % m
		p //= 2
		n = n * n % m
	return result

def find_least_diff(n):
	A = 2 * (pow(2, n / 2 - 1) - 1)
	B = -pow(2, n / 2)
	return int(abs(B - A))

def find_ways(n):
	return (n - 1) // 2

def count_digits(n):
	m = 9
	count = n
	while True:
		if n >= m:
			count += n - m
		else:
			break
		m = str(m)
		m += '9'
		m = int(m)
	return count

def kth_bit_set(n, k):
	return n & 1 << k - 1

def sum_is_zero(n, arr):
	for i in range(pow(2, n)):
		angle_sum = 0
		for j in range(n):
			if kth_bit_set(i, j + 1):
				angle_sum += arr[j]
			else:
				angle_sum -= arr[j]
		if angle_sum % 360 == 0:
			return True
	return False

def get_board(n, m, mat):
	for i in range(n):
		for j in range(m):
			print(i, j)
			if mat[i][j] == '.':
				if (j > 0 and mat[i][j - 1] != 'B') and (i > 0 and mat[i - 1][j] != 'B'):
					mat[i][j] = 'B'
				else:
					mat[i][j] = 'W'
	for i in range(n):
		for j in range(m):
			print(mat[i][j])

def check_and_print_pyth_triplets(n):
	if n <= 2:
		print(-1)
	elif n % 2 == 0:
		temp = n * n
		m = temp / 4 - 1
		k = temp / 4 + 1
		print(str(m), str(k))
	else:
		temp = n * n
		m = (temp - 1) / 2
		k = (temp + 1) / 2
		print(str(m), str(k))

def can_equalize(n, arr, b):
	a = 0
	g = 0
	result = ''
	for i in range(n):
		if a + arr[i] - g <= 500:
			a += arr[i]
			result += 'A'
		else:
			g += b[i]
			result += 'G'
	if abs(a - g) <= 500:
		return result
	return '-1'

def is_square(a1, b1, a2, b2):
	if a1 == a2 and b1 + b2 == a1:
		return True
	elif a1 == b2 and b1 + a2 == a1:
		return True
	elif b1 == a2 and a1 + b2 == b1:
		return True
	elif b1 == b2 and a1 + a2 == b1:
		return True
	return False

def there_is_a_way(n, pipes):
	row = 0
	for c in range(0, n):
		if pipes[c][row] <= 2:
			continue
		else:
			nxt_row = (row + 1) % 2
			if pipes[c][nxt_row] > 2:
				row = nxt_row
			else:
				return false
	return row == 1

def contest_function(n, arr):
	count = 1
	i = n - 1
	mx = 0
	while i > 0:
		if arr[i] <= 2 * arr[i - 1]:
			count += 1
		else:
			mx = max(mx, count)
			count = 1
		i -= 1
	return mx

def fun(y):
	return 1 / 3 * (1 / sqrt(1 + y * y) + 1 / sqrt(25 + y * y) + 4 * (1 / sqrt(1 + 4 * y * y) + 1 / sqrt(1 + 16 * y * y)) + 2 * 1 / sqrt(1 + 9 * y * y))
t = 1
t = int(input())
while t:
	t = t - 1
	count = 0
	arr = []
	b = []
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if is_square(a1, b1, a2, b2):
		print('YES')
	else:
		print('NO')


t = int(input())
output = []
for _ in range(t):
	inp = input()
	inp2 = input()
	first = list(map(int, inp.split(' ')))
	second = list(map(int, inp2.split(' ')))
	first.sort()
	second.sort()
	test2 = 0
	test1 = first[0] + second[0]
	if first[1] == second[1]:
		test2 = first[1]
	else:
		test2 = -1
	if test1 == test2:
		output.append('Yes')
	else:
		output.append('No')
for i in range(t):
	print(output[i])


t = int(input())
while t:
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a == d:
		if b + c == a:
			print('Yes')
			t -= 1
			continue
	if b == c:
		if a + d == b:
			print('Yes')
			t -= 1
			continue
	if a == c:
		if b + d == a:
			print('Yes')
			t -= 1
			continue
	if b == d:
		if a + c == b:
			print('Yes')
			t -= 1
			continue
	print('No')
	t -= 1


n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if max(a, b) == max(c, d) and min(a, b) + min(c, d) == max(a, b):
		print('yes')
	else:
		print('no')


x = int(input())
a = [] * x
b = [] * x
for i in range(x):
	a = [int(i) for i in input().split()]
	b = [int(i) for i in input().split()]
	if a[0] == b[0] and a[1] + b[1] == a[0] or (a[1] == b[0] and a[0] + b[1] == a[1]) or (a[0] == b[1] and a[1] + b[0] == a[0]) or (a[1] == b[1] and a[0] + b[0] == a[1]):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	a = list(map(int, input().rstrip().split()))
	b = list(map(int, input().rstrip().split()))
	if max(a) == max(b):
		x = a.index(max(a))
		y = b.index(max(b))
		if a[abs(x - 1)] + b[abs(y - 1)] == a[x]:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	a = [int(j) for j in input().split()]
	b = [int(j) for j in input().split()]
	a.sort()
	b.sort()
	area = a[0] * a[1] + b[0] * b[1]
	l = int(math.sqrt(area))
	if l ** 2 != area:
		print('No')
	elif a[1] == l:
		if l - a[0] in b:
			print('Yes')
		else:
			print('No')
	elif b[1] == l:
		if l - b[0] in a:
			print('Yes')
		else:
			print('No')
	elif a[0] + b[1] == l and a[1] + b[0] == l:
		print('Yes')
	else:
		print('No')


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
mod = pow(10, 9) + 7
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
for _ in range(int(data())):
	(a1, b1) = sp()
	(a2, b2) = sp()
	r = False
	if a1 == a2:
		r = r or b1 + b2 == a1
	if a1 == b2:
		r = r or b1 + a2 == a1
	if b1 == a2:
		r = r or a1 + b2 == b1
	if b1 == b2:
		r = r or a1 + a2 == b1
	if r:
		out('YES')
		continue
	out('NO')


t = int(input())
while t > 0:
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 == a2 and b1 + b2 == a2:
		print('YES')
	elif a1 == b2 and b1 + a2 == a1:
		print('YES')
	elif b1 == a2 and b2 + a1 == a2:
		print('YES')
	elif b1 == b2 and a1 + a2 == b1:
		print('YES')
	else:
		print('NO')
	t -= 1


testCases = int(input())
for i in range(testCases):
	rec_1 = [int(rec_1) for rec_1 in input().split()]
	rec_2 = [int(rec_2) for rec_2 in input().split()]
	rec_1.sort(reverse=True)
	rec_2.sort(reverse=True)
	if rec_1[0] == rec_2[0]:
		if rec_1[1] + rec_2[1] == rec_2[0]:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())
while t > 0:
	l = list(map(int, input().split()))
	m = list(map(int, input().split()))
	l.sort()
	m.sort()
	x = 0
	if l == m:
		if l[0] * 2 == l[1]:
			print('Yes')
		else:
			print('No')
	else:
		for i in l:
			if i in m:
				x = i
				l.remove(i)
				m.remove(i)
				break
		if l[0] + m[0] == x:
			print('Yes')
		else:
			print('No')
	t -= 1


import math
t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a + c == b and a + c == d or (a + d == b and a + d == c) or (b + c == a and b + c == d) or (b + d == a and b + d == c):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(a, b) = [int(x) for x in input().split()]
	if a < b:
		(a, b) = (b, a)
	(c, d) = [int(x) for x in input().split()]
	if c < d:
		(c, d) = (d, c)
	print(['No', 'Yes'][a == c == b + d])


rilist = lambda : [int(i) for i in input().split()]
rlist = lambda : [i for i in input().split()]
rint = lambda : int(input())
rfloat = lambda : float(input())

def pmat(mat):
	for i in range(len(mat)):
		a = ' '.join(map(str, mat[i]))
		print(a)
	print()

def solve(t):
	(a1, b1) = sorted(rilist())
	(a2, b2) = sorted(rilist())
	if a1 == a2 and b1 + b2 == a2:
		print('Yes')
	elif a1 == b2 and b1 + a2 == b2:
		print('Yes')
	elif b1 == a2 and a1 + b2 == a2:
		print('Yes')
	elif b1 == b2 and a1 + a2 == b2:
		print('Yes')
	else:
		print('No')
test = int(input())
for tc in range(test):
	solve(tc + 1)


test = int(input())
for i in range(test):
	(len1, len2) = input().split()
	(len3, len4) = input().split()
	ans = 'No'
	if len1 == len3:
		if int(len4) + int(len2) == int(len1):
			ans = 'Yes'
	if len1 == len4:
		if int(len3) + int(len2) == int(len1):
			ans = 'Yes'
	if len2 == len3:
		if int(len1) + int(len4) == int(len2):
			ans = 'Yes'
	if len2 == len4:
		if int(len1) + int(len3) == int(len2):
			ans = 'Yes'
	print(ans)


t = int(input())
while t != 0:
	(a, b) = [int(i) for i in input().split()]
	(c, d) = [int(i) for i in input().split()]
	if a == b or c == d:
		print('NO')
	elif a == c and a == b + d:
		print('YES')
	elif a == d and a == b + c:
		print('YES')
	elif b == c and b == a + d:
		print('YES')
	elif b == d and b == c + a:
		print('YES')
	else:
		print('NO')
	t = t - 1


for _ in range(int(input())):
	(a, b) = [int(__) for __ in input().split()]
	(c, d) = [int(___) for ___ in input().split()]
	flag = 0
	if a == c:
		if b + d == a:
			print('Yes')
			flag = 1
			continue
	if a == d:
		if b + c == a:
			print('Yes')
			flag = 1
			continue
	if b == c:
		if a + d == b:
			print('Yes')
			flag = 1
			continue
	if b == d:
		if a + c == b:
			print('Yes')
			flag = 1
			continue
	if flag == 0:
		print('No')


t = int(input())
for y in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 == a2:
		if b1 + b2 == a1:
			print('YES')
			continue
	if a1 == b2:
		if b1 + a2 == a1:
			print('YES')
			continue
	if b1 == a2:
		if a1 + b2 == b1:
			print('YES')
			continue
	if b1 == b2:
		if a1 + a2 == b1:
			print('YES')
			continue
	print('NO')


t = int(input())
ans = []
for s in range(t):
	(l1, b1) = [int(x) for x in input().split()]
	(l2, b2) = [int(x) for x in input().split()]
	if max(l1, b1) == max(l2, b2) and min(l1, b1) + min(l2, b2) == max(l1, b1):
		ans.append('YES')
	else:
		ans.append('NO')
for it in ans:
	print(it)


import sys

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7

def check(a, b, c, d):
	return a == c == b + d or a == d == b + c or b == c == a + d or (b == d == a + c)
for _ in range(INT()):
	(a, b) = MAP()
	(c, d) = MAP()
	if check(a, b, c, d):
		Yes()
	else:
		No()


def f(x, y, z, t):
	if x == z and y + t == x:
		return 'YES'
	elif x == t and y + z == x:
		return 'YES'
	elif y == z and x + t == y:
		return 'YES'
	elif y == t and z + x == y:
		return 'YES'
	else:
		return 'NO'
t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	(z, t) = map(int, input().split())
	print(f(x, y, z, t))


x = int(input())
while x > 0:
	l1 = input()
	l1.split()
	l1a = []
	l2a = []
	l1a = [int(x) for x in l1.split()]
	if l1a[0] <= l1a[1]:
		min1 = l1a[0]
		l1other = l1a[1]
	else:
		min1 = l1a[1]
		l1other = l1a[0]
	l2 = input()
	l2.split()
	l2a = [int(x) for x in l2.split()]
	if l2a[0] <= l2a[1]:
		min2 = l2a[0]
		l2other = l2a[1]
	else:
		min2 = l2a[1]
		l2other = l2a[0]
	summin = min1 + min2
	if summin == l1other:
		if l2other == summin:
			print('Yes')
		else:
			print('No')
	else:
		print('No')
	x -= 1


import math
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if c + b == a == d or a + d == b == c or a + c == d == b or (b + d == a == c):
		print('Yes')
	else:
		print('No')


test = int(input())
count = 0
while count < test:
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 > b1:
		(a1, b1) = (b1, a1)
	if a2 > b2:
		(a2, b2) = (b2, a2)
	if b1 == b2 and b1 == a1 + a2:
		print('YES')
	else:
		print('NO')
	count = count + 1


t = int(input())
for i in range(t):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	if len(set(a) & set(b)) == 0:
		print('no')
	elif min(a) + min(b) == max(set(a) & set(b)):
		print('yes')
	else:
		print('no')


k = int(input())
for i in range(k):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a == c and b + d == a or (a == d and b + c == a) or (b == c and a + d == b) or (b == d and a + c == b):
		print('Yes')
	else:
		print('No')


t = int(input())
while t:
	t -= 1
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	(a, b) = (min(a, b), max(a, b))
	if a + c == d == b or a + d == c == b:
		print('Yes')
	else:
		print('No')


t = int(input())
while t:
	(a1, b1) = list(map(int, input().split()))
	(a2, b2) = list(map(int, input().split()))
	a = min(a1, b1)
	b = min(a2, b2)
	if a + b == max(a1, b1) and a + b == max(a2, b2):
		print('Yes')
	else:
		print('No')
	t = t - 1


def f(a1, b1, a2, b2):
	if a1 < b1:
		(a1, b1) = (b1, a1)
	if a2 < b2:
		(a2, b2) = (b2, a2)
	if a1 == a2 == b1 + b2:
		return 'Yes'
	else:
		return 'No'
for i in range(int(input())):
	(a1, b1) = input().split(' ')
	(a2, b2) = input().split(' ')
	print(f(int(a1), int(b1), int(a2), int(b2)))


for i in range(int(input())):
	d1 = [int(e) for e in input().split()]
	a1 = d1[0]
	b1 = d1[1]
	d2 = [int(p) for p in input().split()]
	a2 = d2[0]
	b2 = d2[1]
	if a1 + a2 == b1 == b2 or a1 + b2 == a2 == b1 or b1 + a2 == a1 == b2 or (b1 + b2 == a1 == a2):
		print('YES')
	else:
		print('NO')


def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
entries = inp()
for i in range(entries):
	rect1 = inlt()
	rect2 = inlt()
	if max(rect1) == max(rect2) and min(rect1) + min(rect2) == max(rect1):
		print('Yes')
	else:
		print('No')


def check(x1, y1, x2, y2):
	if x1 == x2:
		if y1 + y2 == x1:
			return 'Yes'
	if x1 == y2:
		if x2 + y1 == x1:
			return 'Yes'
	if y1 == y2:
		if x1 + x2 == y1:
			return 'Yes'
	if y1 == x2:
		if x1 + y2 == y1:
			return 'Yes'
	return 'No'
t = int(input())
for _ in range(t):
	(x1, y1) = map(int, input().split())
	(x2, y2) = map(int, input().split())
	print(check(x1, y1, x2, y2))


t = int(input())
for i in range(t):
	x = input().split()
	y = input().split()
	for j in range(2):
		x[j] = int(x[j])
		y[j] = int(y[j])
	if max(x) == max(y):
		if min(x) + min(y) == max(x):
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for i in range(int(input())):
	(rw, rl) = map(int, input().split())
	(lw, ll) = map(int, input().split())
	if rl < rw:
		(rw, rl) = (rl, rw)
	if rl == rw:
		print('No')
	elif rl in [lw, ll]:
		if rl == ll:
			if rw + lw == rl:
				print('Yes')
			else:
				print('No')
		elif rw + ll == rl:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	(n, m) = map(int, input().split())
	if a > b:
		(a, b) = (b, a)
	if n > m:
		(n, m) = (m, n)
	if a + n == b and a + n == m:
		print('YES')
	else:
		print('NO')


test = int(input())
result = dict()
for i in range(test):
	(a, b) = input().split()
	(x, y) = input().split()
	a = int(a)
	b = int(b)
	x = int(x)
	y = int(y)
	if a > b:
		width1 = b
		length1 = a
	else:
		width1 = a
		length1 = b
	if x > y:
		width2 = y
		length2 = x
	else:
		width2 = x
		length2 = y
	width = width1 + width2
	if length1 == width and length1 == length2:
		result[i] = 'Yes'
	else:
		result[i] = 'No'
for i in range(test):
	print(result[i])


t = int(input())
for i in range(t):
	(a, b) = [int(i) for i in input().split()]
	(c, d) = [int(i) for i in input().split()]
	a_b_lower = a
	a_b_higher = b
	if b < a:
		a_b_lower = b
		a_b_higher = a
	c_d_lower = c
	c_d_higher = d
	if d < c:
		c_d_lower = d
		c_d_higher = c
	if a_b_higher == c_d_higher:
		if a_b_lower + c_d_lower == a_b_higher:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a == c and b + d == a or (a == d and b + c == a) or (b == d and a + c == b) or (b == c and a + d == b):
		print('YES')
	else:
		print('no')


def yn(ab1, ab2):
	Ab1 = sorted(ab1, reverse=True)
	Ab2 = sorted(ab2, reverse=True)
	if Ab1[0] == Ab2[0] and Ab1[1] + Ab2[1] == Ab1[0]:
		return 'Yes'
	else:
		return 'No'
	if Ab1[1] == Ab2[1] and Ab1[0] + Ab2[0] == Ab1[1]:
		return 'Yes'
	else:
		return 'No'
t = int(input())
while t > 0:
	ab1 = list(map(int, input().split()))
	ab2 = list(map(int, input().split()))
	c = yn(ab1, ab2)
	print(c)
	t = t - 1


q = int(input())
while q > 0:
	q -= 1
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if max(a, b) == max(c, d) and min(a, b) + min(c, d) == max(a, b):
		print('YES')
	else:
		print('NO')


import sys

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
for i in range(int(input())):
	a = get_list()
	a1 = get_list()
	if max(a) == max(a1):
		if min(a) + min(a1) == max(a):
			print('Yes')
		else:
			print('NO')
	else:
		print('NO')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if b == d and a + c == b:
		print('yes')
	elif b == c and a + d == b:
		print('yes')
	elif a == c and b + d == a:
		print('yes')
	elif a == d and b + c == a:
		print('yes')
	else:
		print('no')


from collections import deque
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def solve():
	for _ in range(ii()):
		(a, b) = mi()
		(c, d) = mi()
		f = 0
		if a == d and a == b + c:
			f = 1
		if b == c and b == a + d:
			f = 1
		if a == c and a == b + d:
			f = 1
		if b == d and b == a + c:
			f = 1
		if f == 1:
			print('YES')
		else:
			print('NO')
solve()


def solve():
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 == a2 and b1 + b2 == a1:
		return True
	if a1 == b2 and a2 + b1 == a1:
		return True
	if b1 == a2 and a1 + b2 == b1:
		return True
	if b1 == b2 and a1 + a2 == b1:
		return True
	return False
t = int(input())
for _ in range(t):
	if solve():
		print('Yes')
	else:
		print('No')


def main():
	n = int(input())
	for i in range(0, n):
		solve()

def solve():
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a > b:
		(a, b) = (b, a)
	if c > d:
		(c, d) = (d, c)
	if b == d and a + c == b:
		print('Yes')
	else:
		print('No')
main()


def solve_test_case(t):
	dims1 = parse_array(int)
	dims2 = parse_array(int)
	for i in range(2):
		for j in range(2):
			if dims1[i] == dims2[j] and dims1[i] == dims1[i - 1] + dims2[j - 1]:
				print('YES')
				return
	print('NO')

def parse_array(f):
	return list(map(f, input().split()))

def solve():
	T = int(input())
	for t in range(T):
		solve_test_case(t)
solve()


t = int(input())
a = []
for i in range(t):
	ans = 'No'
	(a1, a2) = input().split()
	a1 = int(a1)
	a2 = int(a2)
	(b1, b2) = input().split()
	b1 = int(b1)
	b2 = int(b2)
	if a1 + b1 == b2 and b2 == a2:
		ans = 'Yes'
	elif a1 + b2 == b1 and b1 == a2:
		ans = 'Yes'
	elif a2 + b1 == b2 and b2 == a1:
		ans = 'Yes'
	elif a2 + b2 == b1 and b1 == a1:
		ans = 'Yes'
	a.append(ans)
for i in a:
	print(i)


for _ in range(int(input())):
	((a, b), (c, d)) = [sorted(map(int, input().split())) for _ in range(2)]
	print(('No', 'Yes')[d == b and a + c == b])


q = int(input())
while q:
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	(a, b) = (min(a, b), max(a, b))
	(c, d) = (min(c, d), max(c, d))
	if a + c == b and a + c == d:
		print('Yes')
	else:
		print('No')
	q -= 1


t = int(input())
z = 1
while z <= t:
	(a1, b1) = input().split()
	(a2, b2) = input().split()
	(a1, b1, a2, b2) = (int(a1), int(b1), int(a2), int(b2))
	if a1 == a2 == b1 + b2 or a1 == b2 == a2 + b1 or b1 == a2 == a1 + b2 or (b1 == b2 == a1 + a2):
		print('Yes')
	else:
		print('No')
	z += 1


def solve():
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a == c == b + d or a == d == c + b or b == c == a + d or (b == d == a + c):
		print('Yes')
	else:
		print('No')
t = int(input())
for _ in range(t):
	solve()


n = int(input())
r = []
for i in range(n):
	f = input().split()
	s = input().split()
	for j in range(len(f)):
		f[j] = int(f[j])
		s[j] = int(s[j])
	f = sorted(f)
	s = sorted(s)
	if f[0] == s[0] and f[1] == s[1] and (f[0] + s[0] == f[1]):
		if f[0] == f[1]:
			r.append('NO')
		else:
			r.append('YES')
	elif f[0] + s[0] == s[1] and f[1] == s[1]:
		r.append('YES')
	else:
		r.append('NO')
for k in range(len(r)):
	print(r[k])


for i in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	l1 = [a, b]
	l2 = [c, d]
	l1.sort()
	l2.sort()
	if max(l1) == max(l2):
		if l1[0] + l2[0] == max(l1):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


def read_array():
	x = []
	x1 = []
	x = input()
	x = x.split(' ')
	for r in range(len(x)):
		x1.append(int(x[r]))
	return x1

def is_square(x, y):
	x.sort()
	y.sort()
	if x[-1] == y[-1] and (x[0] + y[0] == x[-1] and x[0] + y[0] == y[-1]):
		return 'YES'
	else:
		return 'NO'
m = int(input())
res = []
for r in range(m):
	x = read_array()
	y = read_array()
	res.append(is_square(x, y))
for v in res:
	print(v)


n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a == c and b + d == a:
		print('YES')
	elif a == d and b + c == a:
		print('YES')
	elif b == c and a + d == b:
		print('YES')
	elif b == d and a + c == d:
		print('YES')
	else:
		print('NO')


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return [int(i) for i in input().split()]

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)
for _ in range(ii()):
	(a1, b1) = sorted(mi())
	(a2, b2) = sorted(mi())
	if b1 == b2 and a1 + a2 == b1:
		print('YES')
	else:
		print('NO')


from sys import stdin
z = int(input())
for _ in range(z):
	l1 = list(map(int, stdin.readline().rstrip().split(' ')))
	l2 = list(map(int, stdin.readline().rstrip().split(' ')))
	l1.sort()
	l2.sort()
	r = 'YES'
	if l1[1] != l2[1]:
		r = 'NO'
	if l1[0] + l2[0] != l1[1]:
		r = 'NO'
	print(r)


for _ in range(int(input())):
	(a, b) = [int(i) for i in input().split()]
	(c, d) = [int(i) for i in input().split()]
	if a > b:
		(a, b) = (b, a)
	if c > d:
		(c, d) = (d, c)
	if a == c:
		if b + d == a:
			print('YES')
	if b == d:
		if a + c == b:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


def decide(a, b, a2, b2):
	if a + a2 == b and a + a2 == b2:
		print('Yes')
	elif a + b2 == b and a + b2 == a2:
		print('Yes')
	elif b + a2 == b2 and b + a2 == a:
		print('Yes')
	elif b + b2 == a and b + b2 == a2:
		print('Yes')
	else:
		print('No')
t = int(input())
for i in range(t):
	ab = list(map(int, input().split()))
	a = ab[0]
	b = ab[1]
	ab2 = list(map(int, input().split()))
	a2 = ab2[0]
	b2 = ab2[1]
	decide(a, b, a2, b2)


t = int(input(''))
x = t
while t > 0:
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	flag = -1
	for i in range(2):
		if a == c:
			if b + d == a:
				flag = 1
		elif a == d:
			if b + c == a:
				flag = 1
		(a, b) = (b, a)
	if flag == 1:
		print('Yes')
	else:
		print('No')
	t -= 1


import sys, math, cmath, time
start_time = time.time()
tt = 0

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	return input().strip()

def invr():
	return map(int, input().split())

def solve():
	(a, b) = sorted(invr())
	(c, d) = sorted(invr())
	if a + c == b and b == d:
		print('Yes')
	else:
		print('No')

def main():
	if not ONLINE_JUDGE:
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	t = 1
	t = inp()
	for tt in range(t):
		solve()
	if not ONLINE_JUDGE:
		print('Time Elapsed :', time.time() - start_time, 'seconds')
	sys.stdout.close()

def counter(a):
	q = [0] * max(a)
	for i in range(len(a)):
		q[a[i] - 1] = q[a[i] - 1] + 1
	return q

def string_counter(a):
	q = [0] * 26
	for i in range(len(a)):
		q[ord(a[i]) - 97] = q[ord(a[i]) - 97] + 1
	return q
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


import math
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	total = a * b + c * d
	ans = int(math.sqrt(total))
	if ans ** 2 == total:
		if a + c == b and b == d or (a + d == b and b == c) or (b + c == d and a == d) or (b + d == a and a == c):
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for i in range(int(input())):
	first = list(map(int, input().split()))
	second = list(map(int, input().split()))
	first.sort()
	second.sort()
	if first[1] != second[1]:
		print('No')
	elif first[0] + second[0] == first[1]:
		print('Yes')
	else:
		print('No')


for t in range(int(input())):
	(as1, bs1) = map(int, input().split())
	(as2, bs2) = map(int, input().split())
	if as2 == bs2 or as1 == bs1:
		print('No')
		continue
	li = sorted([as1, as2, bs1, bs2])
	if li[-1] == li[-2]:
		if li[-1] == li[0] + li[1]:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(l1, b1) = sorted(list(map(int, input().split())))
	(l2, b2) = sorted(list(map(int, input().split())))
	if b1 == b2:
		l = l1 + l2
		if l == b1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 != a2 and a1 != b2 and (a2 != b1) and (b1 != b2):
		print('No')
	else:
		flag = 0
		if a1 == a2:
			if b1 + b2 == a1:
				flag = 1
			else:
				flag = max(flag, 0)
		if a1 == b2:
			if a2 + b1 == a1:
				flag = 1
			else:
				flag = max(flag, 0)
		if b1 == a2:
			if a1 + b2 == b1:
				flag = 1
			else:
				flag = max(flag, 0)
		if b1 == b2:
			if a1 + a2 == b1:
				flag = 1
			else:
				flag = max(flag, 0)
		if flag == 1:
			print('Yes')
		else:
			print('No')


for _ in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	flag = False
	flag = flag or (b1 == b2 and a1 + a2 == b1)
	flag = flag or (b1 == a2 and a1 + b2 == b1)
	flag = flag or (a1 == b2 and b1 + a2 == a1)
	flag = flag or (a1 == a2 and b1 + b2 == a1)
	print('YES' if flag else 'NO')


t = int(input())
for _ in range(t):
	(a1, a2) = [int(x) for x in input().split()]
	(b1, b2) = [int(x) for x in input().split()]
	if a1 == b1 and b2 + a2 == a1:
		print('YES')
	elif a1 == b2 and a2 + b1 == a1:
		print('YES')
	elif a2 == b2 and a1 + b1 == a2:
		print('YES')
	elif a2 == b1 and a1 + b2 == a2:
		print('YES')
	else:
		print('NO')


num_lines = int(input())
for _ in range(num_lines):
	dim_0 = input().split(' ')
	dim_0 = [int(ele) for ele in dim_0]
	dim_0 = sorted(dim_0)
	dim_1 = input().split(' ')
	dim_1 = [int(ele) for ele in dim_1]
	dim_1 = sorted(dim_1)
	if dim_0[1] != dim_1[1]:
		print('No')
	elif dim_0[0] + dim_1[0] == dim_0[1]:
		print('Yes')
	else:
		print('No')


import sys, math, collections
from collections import defaultdict

def file():
	sys.stdin = open('input.py', 'r')
	sys.stdout = open('output.py', 'w')

def get_array():
	l = list(map(int, input().split()))
	return l

def get_2_ints():
	(a, b) = map(int, input().split())
	return (a, b)

def get_3_ints():
	(a, b, c) = map(int, input().split())
	return (a, b, c)

def sod(n):
	(n, c) = (str(n), 0)
	for i in n:
		c += int(i)
	return c

def getFloor(A, x):
	(left, right) = (0, len(A) - 1)
	floor = -1
	while left <= right:
		mid = (left + right) // 2
		if A[mid] == x:
			return A[mid]
		elif x < A[mid]:
			right = mid - 1
		else:
			floor = A[mid]
			left = mid + 1
	return floor

def main():
	for tt in range(int(input())):
		(n, m) = get_2_ints()
		flag = 0
		(a, b) = get_2_ints()
		if n == a:
			if m + b == a:
				flag = 1
		if n == b:
			if m + a == b:
				flag = 1
		if m == a:
			if n + b == a:
				flag = 1
		if m == b:
			if n + a == b:
				flag = 1
		if flag == 1:
			print('YES')
		else:
			print('NO')
main()


import math
for _ in range(int(input())):
	a = list(map(int, input().split(' ')))
	b = list(map(int, input().split(' ')))
	m1 = max(a)
	m2 = max(b)
	if m1 == m2:
		if min(a) + min(b) == m1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


from math import sqrt
for i in range(int(input())):
	(a, b) = map(int, input().split())
	(a1, b1) = map(int, input().split())
	if int(sqrt(a * b + a1 * b1)) == sqrt(a * b + a1 * b1):
		if a + a1 == b and b == b1 or (a + b1 == b and b == a1) or (a1 + b == a and a == b1) or (b1 + b == a and a == a1):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for _ in range(int(input())):
	a1 = list(map(int, input().split()))
	a2 = list(map(int, input().split()))
	if max(a1) == max(a2) and min(a1) + min(a2) == max(a1):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a == c:
		if a == b + d:
			print('YES')
			continue
	if a == d:
		if a == b + c:
			print('YES')
			continue
	if b == c:
		if b == a + d:
			print('YES')
			continue
	if b == d:
		if b == a + c:
			print('YES')
			continue
	print('NO')


t = int(input())
for i in range(t):
	(n, m) = map(int, input().split())
	(p, q) = map(int, input().split())
	if p > q:
		(p, q) = (q, p)
	if n > m:
		(n, m) = (m, n)
	if m == q:
		if p + n == m:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


n = input()
for i in range(int(n)):
	dim1 = [int(x) for x in input().split(' ')]
	dim2 = [int(x) for x in input().split(' ')]
	min1 = min(dim1)
	min2 = min(dim2)
	dim1.remove(min1)
	dim2.remove(min2)
	if min1 + min2 == dim1[0] and min1 + min2 == dim2[0]:
		print('yes')
	else:
		print('no')


T = int(input())
for t in range(T):
	tmp = input().split()
	(a1, b1) = (int(tmp[0]), int(tmp[1]))
	tmp = input().split()
	(a2, b2) = (int(tmp[0]), int(tmp[1]))
	yes = a1 == a2 and b1 + b2 == a1 or (b1 == b2 and a1 + a2 == b1) or (a1 == b2 and b1 + a2 == a1) or (b1 == a2 and a1 + b2 == a2)
	if yes:
		print('Yes')
	else:
		print('No')


num = int(input())
results = []
for T in range(num):
	x = [int(i) for i in input().split()]
	y = [int(i) for i in input().split()]
	result = x[1] == y[0] and x[1] == x[0] + y[1] or (x[1] == y[1] and x[1] == x[0] + y[0]) or (x[0] == y[0] and x[0] == x[1] + y[1]) or (x[0] == y[1] and x[0] == x[1] + y[0]) or (y[1] == x[0] and y[1] == y[0] + x[1]) or (y[1] == x[1] and y[1] == y[0] + x[0]) or (y[0] == x[0] and y[0] == y[1] + x[1]) or (y[0] == x[1] and y[0] == y[1] + x[0])
	results.append(result)
for result in results:
	print('Yes' if result else 'No')


a = int(input())
for i in range(a):
	(x, y) = list(map(int, input().split()))
	(r, s) = list(map(int, input().split()))
	if x == s and y + r == s:
		print('Yes')
	elif x == r and y + s == x:
		print('Yes')
	elif y == s and x + r == y:
		print('Yes')
	elif y == r and x + s == y:
		print('Yes')
	else:
		print('No')


for n in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	m1 = max(a, b)
	n1 = min(a, b)
	m2 = max(c, d)
	n2 = min(c, d)
	if m1 == m2 and n1 + n2 == m1:
		print('Yes')
	else:
		print('No')


import sys
from fractions import gcd
cin = sys.stdin.buffer.readline
for _ in range(int(cin())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	print(['no', 'yes'][max(a1, b1) == max(a2, b2) == min(a1, b1) + min(a2, b2)])


t = int(input())
for _ in range(t):
	s1 = sorted(list(map(int, input().split())))
	s2 = sorted(list(map(int, input().split())))
	ok = 'NO'
	if s1[0] + s2[0] == s1[1] and s1[1] == s2[1]:
		ok = 'YES'
	print(ok)


for i in range(int(input())):
	arr = list(map(int, input().split(' '))) + list(map(int, input().split(' ')))
	m = max(arr)
	f = arr[0:2]
	s = arr[2:4]
	if f.count(m) == 1 and s.count(m) == 1 and (f[f.index(m) - 1] + s[s.index(m) - 1] == m):
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	v = []
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	m1 = max(a, b)
	m2 = min(a, b)
	m3 = max(c, d)
	m4 = min(c, d)
	if m1 == m3:
		if m2 + m4 == m1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


tc = int(input())
for _ in range(tc):
	(a, b) = map(int, input().split())
	(x, y) = map(int, input().split())
	if x == a:
		if y + b == x:
			print('YES')
			continue
	if x == b:
		if y + a == x:
			print('YES')
			continue
	if y == a:
		if x + b == y:
			print('YES')
			continue
	if y == b:
		if x + a == y:
			print('YES')
			continue
	print('NO')


n = int(input())
for x in range(n):
	(a, b) = list(map(int, input().split()))
	(c, d) = list(map(int, input().split()))
	l = sorted([a, b, c, d])
	if l[0] + l[1] == l[-1] and l[-1] == l[-2] and (c != d) and (a != b):
		print('Yes')
	else:
		print('No')


def solve():
	(n1, k1) = map(int, input().split())
	(n2, k2) = map(int, input().split())
	if k1 + n2 == n1 == k2:
		return 'Yes'
	if k1 + k2 == n1 == n2:
		return 'Yes'
	if n1 + k2 == n2 == k1:
		return 'Yes'
	if n1 + n2 == k2 == k1:
		return 'Yes'
	return 'No'
tests = int(input())
while tests:
	tests -= 1
	print(solve())


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def YES(c):
	return IF(c, 'YES', 'NO')

def Yes(c):
	return IF(c, 'Yes', 'No')

def main():
	t = I()
	rr = []
	for _ in range(t):
		a = LI()
		b = LI()
		m = max(a)
		rr.append(Yes(m == max(b) and m == min(a) + min(b)))
	return JA(rr, '\n')
print(main())


for i in range(int(input())):
	(x1, y1) = input().split()
	(x2, y2) = input().split()
	(x1, y1, x2, y2) = (int(x1), int(y1), int(x2), int(y2))
	test_set = set((x1, y1, x2, y2))
	ans = min(x1, y1) + min(x2, y2) == max(x1, y1) and max(x1, y1) == max(x2, y2)
	if len(test_set) not in (2, 3):
		print('No')
	elif ans:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	X = [int(x) for x in input().split()]
	Y = [int(x) for x in input().split()]
	s = sum(X) + sum(Y)
	good = False
	for x in X:
		for y in Y:
			if x == y and 3 * x == s:
				good = True
	if good:
		print('Yes')
	else:
		print('No')


T = int(input())
for t in range(T):
	i1 = [int(i) for i in input().split(' ')]
	i2 = [int(i) for i in input().split(' ')]
	if i1[0] == i2[0] and i1[1] + i2[1] == i1[0]:
		print('Yes')
	elif i1[0] == i2[1] and i1[1] + i2[0] == i1[0]:
		print('Yes')
	elif i1[1] == i2[0] and i1[0] + i2[1] == i1[1]:
		print('Yes')
	elif i1[1] == i2[1] and i1[0] + i2[0] == i1[1]:
		print('Yes')
	else:
		print('No')


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		(A, B) = [int(x) for x in input().split()]
		(AA, BB) = [int(x) for x in input().split()]
		if B == AA == A + BB or A == AA == B + BB or A == BB == B + AA or (B == BB == A + AA):
			print('Yes')
		else:
			print('No')
main()


T = int(input())
for t in range(T):
	(a, b) = input().split()
	a = int(a)
	b = int(b)
	if a > b:
		(a, b) = (b, a)
	(c, d) = input().split()
	c = int(c)
	d = int(d)
	if c > d:
		(c, d) = (d, c)
	if a + c == d and b == d:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	x = list(map(int, input().split()))
	y = list(map(int, input().split()))
	x.sort()
	y.sort()
	flag = 0
	if x[0] == y[0]:
		sumi = x[1] + y[1]
		if sumi == x[0]:
			flag = 1
	if x[1] == y[1]:
		sumi = x[0] + y[0]
		if sumi == x[1]:
			flag = 1
	if flag == 1:
		print('Yes')
	if flag != 1:
		print('No')


t = int(input())
for i in range(t):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	if max(a) == max(b):
		if max(a) == min(a) + min(b):
			print('Yes')
			continue
	print('No')


a = int(input())
for i in range(a):
	(x1, x2) = map(int, input().split())
	(y1, y2) = map(int, input().split())
	isgood = False
	if x1 == y1 and x2 + y2 == x1:
		isgood = True
	if x1 == y2 and x2 + y1 == x1:
		isgood = True
	if x2 == y1 and y2 + x1 == x2:
		isgood = True
	if x2 == y2 and y1 + x1 == x2:
		isgood = True
	if isgood:
		print('Yes')
	else:
		print('No')


tc = int(input())

def yes():
	print('yes')

def no():
	print('no')
for p in range(tc):
	a = list((int(x) for x in input().split(' ')))
	b = list((int(x) for x in input().split(' ')))
	flag = False
	for i in range(2):
		for j in range(2):
			if a[i] == b[j] and a[i ^ 1] + b[j ^ 1] == a[i]:
				flag = True
	if flag == True:
		yes()
	else:
		no()


t = int(input())
for _ in range(t):
	alist = [int(i) for i in input().split()]
	blist = [int(i) for i in input().split()]
	if alist[0] == blist[0] and alist[1] + blist[1] == alist[0]:
		print('YES')
	elif alist[1] == blist[0] and alist[0] + blist[1] == alist[1]:
		print('YES')
	elif alist[0] == blist[1] and alist[1] + blist[0] == alist[0]:
		print('YES')
	elif alist[1] == blist[1] and alist[0] + blist[0] == alist[1]:
		print('YES')
	else:
		print('NO')


n = int(input())
lista = []
respuestas = []
for i in range(n):
	lis = []
	val1 = [int(i) for i in input().split()]
	lis.append(val1)
	val2 = [int(i) for i in input().split()]
	lis.append(val2)
	lista.append(lis)
	max1 = max(val1)
	max2 = max(val2)
	min1 = min(val1)
	min2 = min(val2)
	if max1 == max2 and min1 + min2 == max1:
		respuestas.append('Yes')
	else:
		respuestas.append('No')
for i in range(n):
	print(respuestas[i])


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for i in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 == a2 and b1 + b2 == a1:
		print('YES')
	elif a1 == b2 and a2 + b1 == a1:
		print('YES')
	elif b1 == a2 and a1 + b2 == b1:
		print('YES')
	elif b1 == b2 and a1 + a2 == b1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	list1 = [int(i) for i in input().split()]
	list2 = [int(i) for i in input().split()]
	list1.sort()
	list2.sort()
	if list1[1] == list2[1] and list1[0] + list2[0] == list1[1]:
		print('YES')
	else:
		print('NO')


t = int(input())
for e in range(t):
	arr = list(map(int, input().split()))
	brr = list(map(int, input().split()))
	arr.sort()
	brr.sort()
	mx = arr[0] + brr[0]
	if mx == arr[1] and mx == brr[1]:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	amax = max(a)
	bmax = max(b)
	if amax == bmax:
		if sum(a) - amax + sum(b) - bmax == amax:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


def solve(w1, l1, w2, l2):
	if w1 == w2 and l1 + l2 == w1:
		return 'YES'
	elif w1 == l2 and w2 + l1 == w1:
		return 'YES'
	elif l1 == w2 and w1 + l2 == w2:
		return 'YES'
	elif l1 == l2 and w2 + w1 == l1:
		return 'YES'
	return 'NO'
t = int(input())
for i in range(t):
	(w1, l1) = tuple(map(int, input().split()))
	(w2, l2) = tuple(map(int, input().split()))
	print(solve(w1, l1, w2, l2))


t = int(input())
for k in range(t):
	l1 = list(map(int, input().split()))
	l2 = list(map(int, input().split()))
	ret = False
	if l1[0] == l2[0]:
		if l1[1] + l2[1] == l1[0]:
			ret = True
			print('Yes')
	if l1[1] == l2[0]:
		if l1[0] + l2[1] == l1[1]:
			ret = True
			print('Yes')
	if l1[0] == l2[1]:
		if l1[1] + l2[0] == l1[0]:
			ret = True
			print('Yes')
	if l1[1] == l2[1]:
		if l1[0] + l2[0] == l1[1]:
			ret = True
			print('Yes')
	if not ret:
		print('No')


R = lambda : sorted(map(int, input().split()))
(t,) = R()
exec(t * "a,b=R();c,d=R();print('NYOE S'[b==d==a+c::2]);")


t = int(input())
while t:
	(b1, a1) = sorted(map(int, input().split()))
	(b2, a2) = sorted(map(int, input().split()))
	if a1 == a2:
		if b1 + b2 == a1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')
	t -= 1


def square():
	results = []
	for i in range(int(input())):
		r1 = [int(i) for i in input().split()]
		r2 = [int(i) for i in input().split()]
		results.append('Yes' if sum([sum(r1), sum(r2)]) / 3 == max(r1) == max(r2) else 'No')
	print(*results, sep='\n')
	return
square()


t = int(input())
for i in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 + a2 == b1 == b2 or a1 + b2 == a2 == b1 or b1 + a2 == a1 == b2 or (b1 + b2 == a1 == a2):
		print('Yes')
	else:
		print('No')


import sys

def read_int():
	return int(sys.stdin.readline())

def read_ints():
	return list(map(int, sys.stdin.readline().split()))
t = read_int()
input1 = [(2, 3), (3, 1), (3, 2), (1, 3), (3, 3), (1, 3)]
for j in range(t):
	(a1, b1) = read_ints()
	(a2, b2) = read_ints()
	if a1 == a2 and b1 + b2 == a1 or (b1 == b2 and a1 + a2 == b1) or (a1 == b2 and b1 + a2 == a1) or (a2 == b1 and b2 + a1 == a2):
		print('Yes')
	else:
		print('No')


T = int(input().strip())
for i in range(T):
	a = list(map(int, input().strip().split()))
	b = list(map(int, input().strip().split()))
	flag = False
	for i in range(2):
		for j in range(2):
			if a[i] == b[j] and a[1 - i] + b[1 - j] == a[i]:
				flag = True
	print('Yes' if flag else 'No')


for i in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	(x, y) = (max(a, b), min(a, b))
	(z, w) = (max(c, d), min(c, d))
	if x == z and y + w == x:
		print('Yes')
	else:
		print('No')


R = lambda : sorted(map(int, input().split()))
(t,) = R()
for _ in [0] * t:
	(a, b) = R()
	(c, d) = R()
	print('NYOE S'[b == d == a + c::2])


def checkSquare(a1, b1, a2, b2):
	if max(a1, b1) == max(a2, b2) and min(a1, b1) + min(a2, b2) == max(a1, b1):
		print('YES')
	else:
		print('NO')

def main():
	t = int(input())
	for i in range(t):
		(a1, b1) = list(map(int, input().split()))
		(a2, b2) = list(map(int, input().split()))
		checkSquare(a1, b1, a2, b2)
main()


n = int(input())
q = []
for i in range(n):
	(a1, b1) = [int(v) for v in input().split()]
	(a2, b2) = [int(c) for c in input().split()]
	dim1 = sorted([a1, b1])
	dim2 = sorted([a2, b2])
	if dim1[0] + dim2[0] == dim1[1] and dim1[1] == dim2[1]:
		print('Yes')
		continue
	else:
		print('No')
		continue


case = int(input())
for i in range(case):
	first = list(map(int, input().rstrip().split()))
	second = list(map(int, input().rstrip().split()))
	x = min(first) + min(second)
	if x == max(first) and x == max(second):
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	(a1, b1) = map(int, input().split())
	r = a * b
	e = a1 * b1
	r = r + e
	if math.sqrt(r) == int(math.sqrt(r)):
		q = int(math.sqrt(r))
		if max(a, b) == q and max(a1, b1) == q and (min(a, b) + min(a1, b1) == q):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())
a1 = []
a2 = []
b1 = []
b2 = []
for i in range(t):
	ab1 = input().split()
	a1.append(int(ab1[0]))
	b1.append(int(ab1[1]))
	ab2 = input().split()
	a2.append(int(ab2[0]))
	b2.append(int(ab2[1]))
	pass
for i in range(t):
	mess = 'yes'
	if a1[i] < b1[i]:
		lo1 = b1[i]
		la1 = a1[i]
	else:
		la1 = b1[i]
		lo1 = a1[i]
	if a2[i] < b2[i]:
		lo2 = b2[i]
		la2 = a2[i]
	else:
		la2 = b2[i]
		lo2 = a2[i]
	if lo1 != lo2:
		mess = 'no'
	if la1 + la2 != lo1:
		mess = 'no'
	print(mess)


for i in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 == a2 and b1 + b2 == a1:
		print('YES')
	elif a1 == b2 and b1 + a2 == a1:
		print('YES')
	elif b1 == a2 and a1 + b2 == b1:
		print('YES')
	elif b1 == b2 and a1 + a2 == b1:
		print('YES')
	else:
		print('NO')


import math
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(x, y) = map(int, input().split())
	if a == x and b + y == a:
		print('YES')
	elif a == y and b + x == a:
		print('YES')
	elif b == x and a + y == b:
		print('YES')
	elif b == y and a + x == b:
		print('YES')
	else:
		print('NO')


import sys
import math

def inputnum():
	return int(input())

def inputnums():
	return map(int, input().split())

def inputlist():
	return list(map(int, input().split()))

def inputstring():
	return [x for x in input()]
t = int(input())
for q in range(t):
	(a1, b1) = inputnums()
	(a2, b2) = inputnums()
	if max(a1, b1) == max(a2, b2) and min(a1, b1) + min(a2, b2) == max(a1, b1):
		print('Yes')
	else:
		print('No')


import math
n = int(input())
for i in range(n):
	(a1, b1) = list(map(int, input().split()))
	(a2, b2) = list(map(int, input().split()))
	area1 = a1 * a2
	area2 = b1 * b2
	totalarea = area1 + area2

	def Max(num1, num2):
		if num1 > num2:
			return num1
		else:
			return num2

	def Min(num1, num2):
		if num1 < num2:
			return num1
		else:
			return num2
	if Max(a1, b1) == Max(a2, b2) and Min(a1, b1) + Min(a2, b2) == Max(a1, b1):
		print('YES')
	else:
		print('NO')


t = int(input())
i = 0
while i < t:
	a = list(map(int, input().split()))
	c = list(map(int, input().split()))
	a.sort()
	c.sort()
	if a[0] + c[0] == c[1] and c[1] == a[1]:
		print('Yes')
	else:
		print('No')
	i = i + 1


t = int(input())
for _ in range(t):
	(a1, b1) = sorted(map(int, input().split()))
	(a2, b2) = sorted(map(int, input().split()))
	if b1 == b2 and a1 + a2 == b1:
		print('yes')
	else:
		print('no')


import sys
input = lambda : sys.stdin.readline().rstrip()
for _ in range(int(input())):
	a = sorted([int(i) for i in input().split()])
	b = sorted([int(i) for i in input().split()])
	if a[1] == b[1]:
		if a[0] + b[0] == a[1]:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


n = int(input())
while n != 0:
	(len1, wid1) = list(map(int, input().split()))
	(len2, wid2) = list(map(int, input().split()))
	if len1 == len2 and wid1 + wid2 == len1:
		print('YES')
	elif len1 == wid2 and wid1 + len2 == len1:
		print('YES')
	elif wid1 == len2 and len1 + wid2 == len2:
		print('YES')
	elif wid1 == wid2 and len1 + len2 == wid1:
		print('YES')
	else:
		print('NO')
	n -= 1


n = int(input())
for i in range(n):
	(a1, b1) = list(map(int, input().split()))
	(a2, b2) = list(map(int, input().split()))

	def Max(num1, num2):
		if num1 > num2:
			return num1
		else:
			return num2

	def Min(num1, num2):
		if num1 < num2:
			return num1
		else:
			return num2
	if Max(a1, b1) == Max(a2, b2) and Min(a1, b1) + Min(a2, b2) == Max(a1, b1):
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
output = sys.stdout

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def solve(a1, a2, b1, b2):
	res = 'No'
	if a1 == b1 and a2 + b2 == a1:
		res = 'Yes'
	elif a1 == b2 and a2 + b1 == a1:
		res = 'Yes'
	elif a2 == b1 and a1 + b2 == a2:
		res = 'Yes'
	elif a2 == b2 and a1 + b1 == a2:
		res = 'Yes'
	output.write(res + '\n')
n = inp()
for i in range(n):
	my_list1 = inlt()
	my_list2 = inlt()
	a1 = my_list1[0]
	a2 = my_list1[1]
	b1 = my_list2[0]
	b2 = my_list2[1]
	solve(a1, a2, b1, b2)


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a == c and b == d or (a == d and b == c):
		if max(a, b) == 2 * min(a, b):
			print('YES\n')
		else:
			print('NO\n')
	elif a == c or a == d:
		if b + c + d == a * 2:
			print('YES')
		else:
			print('NO')
	elif b == c or b == d:
		if a + c + d == b * 2:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for i in range(int(input())):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	ok = False
	for j in range(2):
		for k in range(2):
			ok |= a[j] == b[k] and a[j ^ 1] + b[k ^ 1] == a[j]
	print(['NO', 'YES'][ok])


from sys import stdin, stdout
for _ in range(int(stdin.readline().strip())):
	(a1, b1) = list(map(int, stdin.readline().strip().split()))
	(a2, b2) = list(map(int, stdin.readline().strip().split()))
	if min(a1, b1) + min(a2, b2) == max(a1, b1) and min(a1, b1) + min(a2, b2) == max(a2, b2):
		stdout.write('Yes' + '\n')
	else:
		stdout.write('No' + '\n')


t = int(input())
for i in range(t):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	a.sort()
	b.sort()
	if a[0] + b[0] == b[1] and a[1] == b[1]:
		print('Yes')
	else:
		print('No')


from collections import deque
t = int(input())
rez = []
for i in range(t):
	A = input().split()
	B = input().split()
	for j in range(2):
		A[j] = int(A[j])
		B[j] = int(B[j])
	if min(A) + min(B) == max(A) and min(A) + min(B) == max(B):
		rez.append('YES')
	else:
		rez.append('NO')
for i in range(len(rez)):
	print(rez[i])


t = int(input())
while t:
	(a, b) = map(int, input().split())
	(x, y) = map(int, input().split())
	l = [a, b]
	ll = [x, y]
	m = max(l)
	su = 0
	lol = 0
	if m not in ll:
		lol = 1
	su = 0
	if a == m:
		su += b
	else:
		su += a
	if x == m:
		su += y
	else:
		su += x
	if su != m:
		lol = 1
	if lol:
		print('no')
	else:
		print('yes')
	t -= 1


t = int(input())
Ans = []
for _ in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if max(a, b) == max(c, d) and min(a, b) + min(c, d) == max(a, b):
		Ans.append('Yes')
	else:
		Ans.append('No')
for s in Ans:
	print(s)


from math import *
t = int(input())
m = []
n = []
for i in range(t):
	x = list(map(int, input().split()))
	y = list(map(int, input().split()))
	m.append(x)
	n.append(y)
for i in range(t):
	a = n[i]
	b = m[i]
	flag = 0
	if a[0] == b[0]:
		if a[1] + b[1] == a[0]:
			flag = 1
	if a[0] == b[1]:
		if a[1] + b[0] == a[0]:
			flag = 1
	if a[1] == b[0]:
		if a[0] + b[1] == a[1]:
			flag = 1
	if a[1] == b[1]:
		if a[0] + b[0] == a[1]:
			flag = 1
	if flag == 0:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	sa = input().split(' ')
	sb = input().split(' ')
	cele = 0
	for d in sa:
		if d in sb:
			cele = d
			break
	if cele == 0:
		print('No')
		continue
	sa.remove(cele)
	sb.remove(cele)
	if int(sa[0]) + int(sb[0]) == int(cele):
		print('Yes')
	elif int(sa[0]) == int(sb[0]) and int(cele) * 2 == int(sa[0]):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(a1, b1) = list(map(int, input().split()))
	(a2, b2) = list(map(int, input().split()))
	ans = 'No'
	if a1 == a2 and b1 + b2 == a1:
		ans = 'Yes'
	if a1 == b2 and a2 + b1 == a1:
		ans = 'Yes'
	if b1 == a2 and a1 + b2 == a2:
		ans = 'Yes'
	if b1 == b2 and a1 + a2 == b1:
		ans = 'Yes'
	print(ans)


ipnl = lambda n: [int(input()) for _ in range(n)]
inp = lambda : int(input())
ip = lambda : [int(w) for w in input().split()]
mp = lambda : map(int, input().split())
for _ in range(int(input())):
	(a, b) = mp()
	(c, d) = mp()
	if a == c and b + d == a or (a == d and b + c == a):
		print('YES')
	elif b == c and a + d == b or (b == d and a + c == b):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	(x, y) = map(int, input().split())
	if a != b:
		if x != y:
			k = min(a, b) + min(x, y)
			if k == max(x, y) and k == max(a, b):
				print('Yes')
			else:
				print('No')
		else:
			print('No')
	else:
		print('No')


import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *

class Scanner:

	@staticmethod
	def int():
		return int(sys.stdin.readline().rstrip())

	@staticmethod
	def string():
		return sys.stdin.readline().rstrip()

	@staticmethod
	def map_int():
		return [int(x) for x in Scanner.string().split()]

	@staticmethod
	def string_list(n):
		return [Scanner.string() for i in range(n)]

	@staticmethod
	def int_list_list(n):
		return [Scanner.map_int() for i in range(n)]

	@staticmethod
	def int_cols_list(n):
		return [Scanner.int() for i in range(n)]

class Math:

	@staticmethod
	def gcd(a, b):
		if b == 0:
			return a
		return Math.gcd(b, a % b)

	@staticmethod
	def lcm(a, b):
		return a * b // Math.gcd(a, b)

	@staticmethod
	def divisor(n):
		res = []
		i = 1
		for i in range(1, int(n ** 0.5) + 1):
			if n % i == 0:
				res.append(i)
				if i != n // i:
					res.append(n // i)
		return res

	@staticmethod
	def round_up(a, b):
		return -(-a // b)

	@staticmethod
	def is_prime(n):
		if n < 2:
			return False
		if n == 2:
			return True
		if n % 2 == 0:
			return False
		d = int(n ** 0.5) + 1
		for i in range(3, d + 1, 2):
			if n % i == 0:
				return False
		return True

def pop_count(x):
	x = x - (x >> 1 & 6148914691236517205)
	x = (x & 3689348814741910323) + (x >> 2 & 3689348814741910323)
	x = x + (x >> 4) & 1085102592571150095
	x = x + (x >> 8)
	x = x + (x >> 16)
	x = x + (x >> 32)
	return x & 127
MOD = int(1000000000.0) + 7
INF = int(1000000000000000.0)

def solve():
	(a, b) = Scanner.map_int()
	(c, d) = Scanner.map_int()
	if a == c:
		if b + d == a:
			print('YES')
			return
	if a == d:
		if b + c == a:
			print('YES')
			return
	if b == c:
		if a + d == b:
			print('YES')
			return
	if b == d:
		if a + c == b:
			print('YES')
			return
	print('NO')

def main():
	T = Scanner.int()
	for _ in range(T):
		solve()
main()


import math
t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	(m, n) = map(int, input().split())
	xx = math.sqrt(x * y + m * n)
	if int(xx) == xx:
		if max(x, y) == max(m, n):
			print('Yes')
		else:
			print('No')
		continue
	print('No')


import sys
input = sys.stdin.readline

def I():
	return input().strip()

def II():
	return int(input().strip())

def LI():
	return [*map(int, input().strip().split())]
import math
for _ in range(II()):
	lst1 = LI()
	lst2 = LI()
	x = max(lst1)
	y = max(lst2)
	if x != y:
		print('No')
	elif min(lst1) + min(lst2) == x:
		print('Yes')
	else:
		print('No')


try:
	for i in range(int(input())):
		(a, b) = map(int, input().split())
		(p, q) = map(int, input().split())
		lo = 0
		if max(a, b) == max(p, q):
			if min(a, b) + min(p, q) == max(a, b):
				print('Yes')
				lo = 1
		if lo == 0:
			print('No')
except:
	pass


from collections import defaultdict, Counter
import copy, math
from copy import deepcopy
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if math.ceil(math.sqrt(a * b + c * d)) == math.sqrt(a * b + c * d) and max(a, b) == max(c, d):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	(l1, w1) = (min(a1, b1), max(a1, b1))
	(l2, w2) = (min(a2, b2), max(a2, b2))
	if w1 != w2:
		print('No')
	elif l1 + l2 == w1:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	p = 0
	if a1 == a2:
		if b1 + b2 == a1:
			p = 1
	if a1 == b2:
		if b1 + a2 == a1:
			p = 1
	if b1 == a2:
		if a1 + b2 == b1:
			p = 1
	if b1 == b2:
		if a1 + a2 == b1:
			p = 1
	if p == 1:
		print('Yes')
	else:
		print('No')


import math
n = int(input())
for i in range(n):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	if a[0] == b[0] and a[1] + b[1] == a[0]:
		print('Yes')
	elif a[0] == b[1] and a[1] + b[0] == a[0]:
		print('Yes')
	elif a[1] == b[0] and a[0] + b[1] == a[1]:
		print('Yes')
	elif a[1] == b[1] and a[0] + b[0] == a[1]:
		print('Yes')
	else:
		print('No')


import math
from collections import deque

def ii():
	return int(input())

def mii():
	return map(int, input().split())

def lii(n):
	return [int(input()) for _ in range(n)]

def matr(n):
	return [list(mii()) for _ in range(n)]
for _ in range(ii()):
	(a, b) = mii()
	(c, d) = mii()
	if max(a, b) == max(c, d) and min(a, b) + min(c, d) == max(a, b):
		print('YES')
	else:
		print('NO')


import math
t = int(input())
while t:
	(a1, b1) = input().split()
	(a2, b2) = input().split()
	a1 = int(a1)
	a2 = int(a2)
	b1 = int(b1)
	b2 = int(b2)
	if a1 < b1:
		var = a1
		a1 = b1
		b1 = var
	if a2 < b2:
		var = a2
		a2 = b2
		b2 = var
	if int(b1) + int(b2) == int(a1) and a1 == a2:
		print('Yes')
	else:
		print('No')
	t = int(t) - 1


t = int(input())
while t > 0:
	(a, b) = list(map(int, input().split()))
	(c, d) = list(map(int, input().split()))
	if a == c and b + d == a:
		print('YES')
	elif a == d and b + c == a:
		print('YES')
	elif b == c and a + d == b:
		print('YES')
	elif b == d and a + c == b:
		print('YES')
	else:
		print('NO')
	t -= 1


for nt in range(int(input())):
	a = list(map(int, input().split()))
	x = list(map(int, input().split()))
	flag = 0
	if x[0] == a[0]:
		if x[1] + a[1] == x[0]:
			flag = 1
	if x[0] == a[1]:
		if x[1] + a[0] == x[0]:
			flag = 1
	if x[1] == a[0]:
		if x[0] + a[1] == a[0]:
			flag = 1
	if x[1] == a[1]:
		if x[0] + a[0] == a[1]:
			flag = 1
	if flag:
		print('Yes')
	else:
		print('No')


t = int(input())
c = []
for i in range(1, t + 1):
	(a1, a2) = sorted(map(int, input().split()))
	(b1, b2) = sorted(map(int, input().split()))
	if b2 == a2:
		if a1 + b1 == b2:
			x = 'YES'
			c.append(x)
		else:
			x = 'NO'
			c.append(x)
	else:
		x = 'NO'
		c.append(x)
for ans in c:
	print(ans)


for _ in range(int(input())):
	l = list(map(int, input().split()))
	ll = list(map(int, input().split()))
	l.sort()
	ll.sort()
	if l[0] + ll[0] == l[1] and l[0] + ll[0] == ll[1]:
		print('Yes')
	else:
		print('No')


t = int(input())
max1 = ''
max2 = ''
a = []
b = []
square = 'No'
h_a = 0
h_b = 0
l_a = 0
l_b = 0
for i in range(0, t):
	max1 = input()
	max2 = input()
	a = max1.split(' ')
	b = max2.split(' ')
	a[0] = int(a[0])
	a[1] = int(a[1])
	b[0] = int(b[0])
	b[1] = int(b[1])
	if a[0] == a[1] or b[0] == b[1]:
		square = 'No'
		print(square)
	else:
		if a[0] > a[1]:
			h_a = a[0]
			l_a = a[1]
		else:
			h_a = a[1]
			l_a = a[0]
		if b[0] > b[1]:
			h_b = b[0]
			l_b = b[1]
		else:
			h_b = b[1]
			l_b = b[0]
		if h_a != h_b:
			square = 'No'
			print(square)
		elif l_a + l_b == h_a:
			square = 'Yes'
			print(square)
		else:
			square = 'No'
			print(square)


import sys
input = sys.stdin.readline
from math import log2, log, ceil

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return res

def upper_bound(a, x, lo=0):
	hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(1000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
for _ in range(int(input())):
	a = int_array()
	b = int_array()
	a.sort()
	b.sort()
	if a[1] == b[1]:
		if a[0] + b[0] == a[1]:
			print('YES')
			continue
	print('NO')


t = int(input())
for i in range(t):
	square1 = [int(x) for x in input().split()]
	square2 = [int(x) for x in input().split()]
	square1.sort()
	square2.sort()
	if square1[1] != square2[1] or square1[0] + square2[0] != square1[1]:
		print('No')
	else:
		print('Yes')


def sqr(a, b):
	if max(sq1) == max(sq2):
		if min(sq1) + min(sq2) == max(sq1):
			return 'YES'
	return 'NO'
n = int(input())
ans = []
for i in range(n):
	sq1 = list(map(int, input().split()))
	sq2 = list(map(int, input().split()))
	ans.append(sqr(sq1, sq2))
for i in ans:
	print(i)


for _ in range(int(input())):
	(x, y) = map(int, input().split())
	(xx, yy) = map(int, input().split())
	ans = 'No'
	if x == xx:
		if x == y + yy:
			ans = 'Yes'
	if ans == 'No' and x == yy:
		if x == y + xx:
			ans = 'Yes'
	if ans == 'No' and y == xx:
		if y == x + yy:
			ans = 'Yes'
	if ans == 'No' and y == yy:
		if y == x + xx:
			ans = 'Yes'
	print(ans)


t = int(input())
for tests in range(t):
	(a1, b1) = list(map(int, input().split()))
	(a2, b2) = list(map(int, input().split()))
	if min(a1, b1) + min(a2, b2) == max(a1, b1) == max(a2, b2):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(a1, b1) = [int(x) for x in input().split()]
	(a2, b2) = [int(x) for x in input().split()]
	x1 = a1 + a2
	x2 = a1 + b2
	y1 = b1 + a2
	y2 = b1 + b2
	if x1 == b1 and b1 == b2:
		print('YES')
	elif x2 == a2 and a2 == b1:
		print('YES')
	elif y1 == a1 and a1 == b2:
		print('YES')
	elif y2 == a1 and a1 == a2:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	t -= 1
	line = input().split()
	a = int(line[0])
	b = int(line[1])
	line = input().split()
	c = int(line[0])
	d = int(line[1])
	ok = False
	if a == c and b + d == a:
		ok = True
	if a == d and b + c == a:
		ok = True
	if b == c and a + d == b:
		ok = True
	if b == d and a + c == b:
		ok = True
	if ok:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if max(a1, b1) == max(a2, b2) and min(a1, b1) + min(a2, b2) == max(a1, b1):
		print('yes')
	else:
		print('no')


def isSq(a, b):
	if max(a) == max(b) and max(a) == min(a) + min(b):
		return 'Yes'
	return 'No'
testcases = int(input())
for i in range(testcases):
	print(isSq(list(map(int, input().split())), list(map(int, input().split()))))


for _ in range(int(input())):
	a = sorted(list(map(int, input().split())))
	b = sorted(list(map(int, input().split())))
	if b[1] != a[1]:
		print('NO')
		continue
	if a[0] + b[0] == a[1]:
		print('YES')
		continue
	else:
		print('NO')


t = int(input())
for i in range(0, t):
	(a1, b1) = input().strip().split()
	(a2, b2) = input().strip().split()
	(a1, b1, a2, b2) = (int(a1), int(b1), int(a2), int(b2))
	if max(a1, b1) == max(a2, b2) and min(a1, b1) + min(a2, b2) == max(a1, b1):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	x1 = [int(x) for x in input().split()]
	x2 = [int(x) for x in input().split()]
	x1.sort()
	x2.sort()
	ans = 0
	if x1[0] == x2[0]:
		if x1[1] + x2[1] == x1[0]:
			ans = 1
	if x1[0] == x2[1]:
		if x1[1] + x2[0] == x1[0]:
			ans = 1
	if x1[1] == x2[1]:
		if x1[0] + x2[0] == x1[1]:
			ans = 1
	if x1[1] == x2[0]:
		if x1[0] + x2[1] == x1[1]:
			ans = 1
	if ans == 1:
		print('Yes')
	else:
		print('No')


def printv(a, sep=' '):
	print(sep.join(map(str, a)))

def solve(a, b, c, d):
	if a == c == b + d or a == d == b + c or b == c == a + d or (b == d == a + c):
		return 'YES'
	return 'NO'

def main():
	t = int(input())
	ans = [0] * t
	for i in range(t):
		(a, b) = [int(x) for x in input().split()]
		(c, d) = [int(y) for y in input().split()]
		ans[i] = solve(a, b, c, d)
	printv(ans, '\n')
main()


n = int(input())
for i in range(n):
	ans = 'NO'
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 == a2:
		if b1 + b2 == a1:
			ans = 'YES'
	if a1 == b2:
		if b1 + a2 == a1:
			ans = 'YES'
	if b1 == a2:
		if a1 + b2 == b1:
			ans = 'YES'
	if b1 == b2:
		if a1 + a2 == b1:
			ans = 'YES'
	print(ans)


t = int(input())
from math import floor, ceil
for i in range(t):
	(a, b) = list(map(int, input().split()))
	(c, d) = list(map(int, input().split()))
	s = sorted([a, b])
	s2 = sorted([c, d])
	if s[-1] == s2[-1]:
		if s[0] + s2[0] == s[-1]:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


import math
test = int(input())
while test > 0:
	a = input().split()
	b = input().split()
	if max(int(a[0]), int(a[1])) == max(int(b[0]), int(b[1])):
		if min(int(a[0]), int(a[1])) + min(int(b[0]), int(b[1])) == max(int(a[0]), int(a[1])):
			print('Yes')
		else:
			print('No')
	else:
		print('No')
	test -= 1


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def solve():
	ar1 = lis()
	ar2 = lis()
	ar1.sort()
	ar2.sort()
	if ar1[1] == ar2[1] and ar1[0] + ar2[0] == ar1[1]:
		print('YES')
	else:
		print('NO')
testcase(int(inp()))


for _ in range(int(input())):
	(Temp1, Temp2) = (list(map(int, input().split())), list(map(int, input().split())))
	print('YES' if min(Temp1) + min(Temp2) == max(Temp2) == max(Temp1) else 'NO')


t = int(input())
for i in range(t):
	c = 0
	list1 = list(map(int, input().split(' ')))
	list1 += list(map(int, input().split(' ')))
	for j in range(2):
		for k in range(2, 4):
			m = list1[j] + list1[k]
			if list1.count(m) == 2:
				print('Yes')
				c += 1
				break
	if c == 0:
		print('No')


T = int(input())
for z in range(T):
	(a, b) = sorted(map(int, input().split()))
	(c, d) = sorted(map(int, input().split()))
	if d == b:
		if a + c == d:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for _ in range(int(input())):
	(a, b) = list(map(int, input().split()))
	(c, d) = list(map(int, input().split()))
	if a == c and b + d == a or (b == c and a + d == b) or (a == d and b + c == a) or (b == d and a + c == d):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	f = 0
	if a == c and b + d == a:
		f = 1
	if a == d and b + c == d:
		f = 1
	if b == c and a + d == c:
		f = 1
	if b == d and a + c == b:
		f = 1
	if f == 1:
		print('yes')
	else:
		print('no')


import math
t = int(input())
while t > 0:
	t -= 1
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a == c and b + d == a:
		print('Yes')
	elif a == d and b + c == a:
		print('Yes')
	elif b == d and a + c == b:
		print('Yes')
	elif b == c and a + d == b:
		print('Yes')
	else:
		print('No')


def solve_case():
	(a, b) = [int(x) for x in input().split()]
	(aa, bb) = [int(x) for x in input().split()]
	if a > b:
		(a, b) = (b, a)
	if aa > bb:
		(aa, bb) = (bb, aa)
	if b == bb and a + aa == b:
		print('YES')
	else:
		print('NO')
t = int(input())
for _ in range(t):
	solve_case()


t = int(input())
for i in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	mx1 = max(a1, b1)
	mn1 = min(a1, b1)
	mx2 = max(a2, b2)
	mn2 = min(a2, b2)
	if mx1 == mx2:
		if mn1 + mn2 == mx1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for c in range(int(input())):
	(d11, d12) = input().split()
	(d21, d22) = input().split()
	d11 = int(d11)
	d12 = int(d12)
	d21 = int(d21)
	d22 = int(d22)
	if d11 == d21 and d12 + d22 == d21 or (d12 == d22 and d11 + d21 == d22) or (d11 == d22 and d12 + d21 == d22) or (d12 == d21 and d11 + d22 == d21):
		print('Yes')
	else:
		print('No')
	c += 1


for i in range(1, int(input()) * 2 + 1):
	l = list(map(int, input().split()))
	if i % 2 != 0:
		a = l[0]
		b = l[1]
	if i % 2 == 0:
		if a == l[0] and b + l[1] == a or (b == l[0] and a + l[1] == b) or (a == l[1] and b + l[0] == a) or (b == l[1] and a + l[0] == b):
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 > b1:
		(a1, b1) = (b1, a1)
	if a2 > b2:
		(a2, b2) = (b2, a2)
	x = 0
	if b1 == a2:
		if a1 + b2 == b1:
			print('Yes')
		else:
			print('No')
	elif b1 == b2:
		if a1 + a2 == b1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


from math import *
t = int(input())
while t:
	t = t - 1
	(n, m) = map(int, input().split())
	(c, d) = map(int, input().split())
	mn = min(n, m) + min(c, d)
	if mn == max(n, m) and mn == max(c, d):
		print('YES')
	else:
		print('NO')


def check(a1, a2, b1, b2):
	if a1 == a2:
		if b1 + b2 == a1:
			return True
		else:
			return False
T = int(input())
for t in range(T):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if check(a1, a2, b1, b2):
		print('Yes')
		continue
	(a1, b1) = (b1, a1)
	if check(a1, a2, b1, b2):
		print('Yes')
		continue
	(a2, b2) = (b2, a2)
	if check(a1, a2, b1, b2):
		print('Yes')
		continue
	(a1, b1) = (b1, a1)
	if check(a1, a2, b1, b2):
		print('Yes')
		continue
	print('No')


for _ in range(int(input())):
	(x, y) = map(int, input().split())
	(a, b) = map(int, input().split())
	s = 0
	if a + x == y and y == b:
		s = 1
	if a + y == x and x == b:
		s = 1
	if b + x == y and y == a:
		s = 1
	if b + y == x and x == a:
		s = 1
	if s == 1:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split(' '))
	(c, d) = map(int, input().split(' '))
	ok = False
	if a == c:
		if b + d == a:
			ok = True
	if a == d:
		if b + c == a:
			ok = True
	if b == c:
		if a + d == b:
			ok = True
	if b == d:
		if a + c == b:
			ok = True
	if ok:
		print('YES')
	else:
		print('NO')


def solve():
	(a, b) = list(map(int, input().split()))
	(c, d) = list(map(int, input().split()))
	if a == c:
		if b + d == a:
			return 'Yes'
	if a == d:
		if b + c == a:
			return 'Yes'
	if b == c:
		if a + d == b:
			return 'Yes'
	if b == d:
		if a + c == b:
			return 'Yes'
	return 'No'
for i in range(int(input())):
	print(solve())


for t in range(int(input())):
	(x1, x2) = map(int, input().split())
	(y1, y2) = map(int, input().split())
	if x1 == y1 and y2 + x2 == x1:
		print('YES')
	elif x1 == y2 and y1 + x2 == x1:
		print('YES')
	elif x2 == y1 and x1 + y2 == x2:
		print('YES')
	elif x2 == y2 and x1 + y1 == x2:
		print('YES')
	else:
		print('NO')


for i in range(0, int(input())):
	(x1, x2) = map(int, input().split())
	(y1, y2) = map(int, input().split())
	if max(x1, x2) == max(y1, y2):
		if min(x1, x2) + min(y1, y2) == max(x1, x2):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


def squares(a, b, c, d):
	if max(a, b) == max(c, d) and min(a, b) + min(c, d) == max(a, b):
		return 'Yes'
	return 'No'
t = int(input())
arr = [0] * t
for i in range(t):
	(a, b) = input().split()
	(c, d) = input().split()
	a = int(a)
	b = int(b)
	c = int(c)
	d = int(d)
	arr[i] = squares(a, b, c, d)
for i in range(t):
	print(arr[i])


a = eval(input())
for i in range(a):
	lst1 = input().split()
	lst2 = input().split()
	a = eval(lst1[0])
	b = eval(lst1[1])
	c = eval(lst2[0])
	d = eval(lst2[1])
	if a + c == b == d or b + d == a == c or a + d == b == c or (b + c == a == d):
		print('YES')
	else:
		print('NO')


from sys import stdin
input = lambda : stdin.readline().strip()
from math import ceil, sqrt, factorial, gcd
for _ in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 == a2 and b1 + b2 == a1:
		print('Yes')
	elif b1 == a2 and b2 + a1 == a2:
		print('Yes')
	elif a1 == b2 and b1 + a2 == a1:
		print('Yes')
	elif b1 == b2 and a1 + a2 == b1:
		print('Yes')
	else:
		print('No')


import sys
import os
debug = True
if debug and os.path.exists('input.in'):
	input = open('input.in', 'r').readline
else:
	input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
test_count = int(input())
for t in range(test_count):
	(a, b) = invr()
	(c, d) = invr()
	if a > b:
		(a, b) = (b, a)
	if c > d:
		(c, d) = (d, c)
	if a + c == b and a + c == d:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	dimensions_one = sorted(list(map(int, input().split())))
	dimensions_two = sorted(list(map(int, input().split())))
	if dimensions_two[-1] == dimensions_one[-1] and dimensions_one[0] + dimensions_two[0] == dimensions_one[-1]:
		print('Yes')
	else:
		print('No')


import math
for i in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	e = a * b + c * d
	f = math.sqrt(e)
	g = int(f)
	if f % 1 == 0 and (g == a == c or g == a == d or g == b == c or (g == b == d)):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	flag = False
	for (i, x) in enumerate(a):
		for (j, y) in enumerate(b):
			if x == y:
				if a[1 - i] + b[1 - j] == x:
					flag = True
	print('Yes' if flag else 'No')


for _ in range(int(input())):
	(a1, b1) = sorted((int(i) for i in input().split()))
	(a2, b2) = sorted((int(i) for i in input().split()))
	print('YES' if a1 + a2 == b1 == b2 else 'NO')


for i in range(int(input())):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	if max(a) == max(b) and min(a) + min(b) == max(a):
		print('YES')
	else:
		print('NO')


test_cases = int(input().strip())
li = []
for _ in range(test_cases):
	rect_1 = tuple(map(int, input().strip().split()))
	rect_2 = tuple(map(int, input().strip().split()))
	side = min(rect_1) + min(rect_2)
	if side == max(rect_1) and side == max(rect_2):
		li.append('YES')
	else:
		li.append('NO')
print(*li, sep='\n')


t = int(input())
for _ in range(0, t):
	(p, q) = map(int, input().split())
	(r, s) = map(int, input().split())
	z = max(p, q)
	if z == r or z == s:
		l = min(p, q)
		k = min(r, s)
		if l + k == z:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(a1, a2) = map(int, input().split())
	(b1, b2) = map(int, input().split())
	if a2 > a1:
		temp = a1
		a1 = a2
		a2 = temp
	if b2 > b1:
		temp = b1
		b1 = b2
		b2 = temp
	if a1 == b1:
		if a2 + b2 == a1:
			print('Yes')
			continue
		else:
			print('No')
	else:
		print('No')


import sys
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
input = sys.stdin.readline
for tt in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if sorted([a, b]) == sorted([c, d]):
		if min(a, b) + min(c, d) == max(a, b):
			print('YES')
		else:
			print('NO')
	elif a == c:
		if a == b + d:
			print('YES')
		else:
			print('NO')
	elif a == d:
		if a == b + c:
			print('YES')
		else:
			print('NO')
	elif b == c:
		if b == a + d:
			print('YES')
		else:
			print('NO')
	elif b == d:
		if b == a + c:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


import time
import sys
readline = sys.stdin.readline
t = time.time()
for _ in range(int(input())):
	(a1, b1) = map(int, readline().split())
	(a2, b2) = map(int, readline().split())
	if a1 == a2 and a1 == b1 + b2 or (a1 == b2 and a1 == b1 + a2) or (b1 == a2 and b1 == a1 + b2) or (b1 == b2 and b1 == a1 + a2):
		print('Yes')
	else:
		print('No')
while time.time() - t < 0.9:
	pass


q = int(input())
for i in range(q):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if max(a1, b1) == max(a2, b2) == min(a1, b1) + min(a2, b2):
		print('Yes')
	else:
		print('No')


n = int(input())
ans = 0
for i in range(n):
	(q, w) = map(int, input().split())
	(e, r) = map(int, input().split())
	if q == e and w + r == q or (q == r and w + e == q) or (w == e and q + r == w) or (w == r and q + e == w):
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	t = t - 1
	a = input()
	A = sorted(list(map(int, list(a.split()))))
	b = input()
	B = sorted(list(map(int, list(b.split()))))
	flag = 0
	for i in range(1):
		if A[i] == B[i]:
			if A[i + 1] == B[i + 1] and A[i] + B[i] == A[i + 1]:
				print('Yes')
				flag = 1
				break
		elif A[i + 1] == B[i + 1]:
			if A[i] + B[i] == A[i + 1]:
				print('Yes')
				flag = 1
				break
	if flag == 0:
		print('No')


for _ in range(int(input())):
	(a1, b1) = [int(s) for s in input().split()]
	(a2, b2) = [int(s) for s in input().split()]
	flag = False
	if a1 == a2:
		if b1 + b2 == a1:
			flag = True
	if a1 == b2:
		if b1 + a2 == a1:
			flag = True
	if b1 == a2:
		if a1 + b2 == a2:
			flag = True
	if b1 == b2:
		if a1 + a2 == b1:
			flag = True
	if flag:
		print('YES')
	else:
		print('NO')


from sys import stdin
a = int(stdin.readline())
for b in range(0, a):
	A = stdin.readline().split()
	B = stdin.readline().split()
	a = int(A[0])
	b = int(A[1])
	c = int(B[0])
	d = int(B[1])
	if a == c:
		if b + d == a:
			print('YES')
			continue
		if b == d:
			if b + d == a or a + c == b:
				print('YES')
				continue
	if a == d:
		if b + c == a:
			print('YES')
			continue
		if b == c:
			if a + d == b or b + c == a:
				print('YES')
				continue
	if b == c:
		if a + d == b:
			print('YES')
			continue
		if a == d:
			if b + c == a or a + d == b:
				print('YES')
				continue
	if b == d:
		if a + c == b:
			print('YES')
			continue
		if a == c:
			if b + d == a or a + c == b:
				print('YES')
				continue
	print('NO')


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def C():
	n = inp()
	visited = []
	for i in range(n):
		paths = insr()
		for i in range(len(paths)):
			if move == 'N':
				(x0, y0) = visited[-1]
				curr = (x0, y0 + 1)
			elif move == 'S':
				(x0, y0) = visited[-1]
				curr = (x0, y0 - 1)
			elif move == 'E':
				(x0, y0) = visited[-1]
				curr = (x0 + 1, y0)
			elif move == 'W':
				(x0, y0) = visited[-1]
				curr = (x0 - 1, y0)

def A():
	n = inp()
	for i in range(n):
		(a1, b1) = invr()
		(a2, b2) = invr()
		(a1, b1) = (max([a1, b1]), min([a1, b1]))
		(a2, b2) = (max([a2, b2]), min([a2, b2]))
		if a1 == a2:
			if b1 + b2 == a1:
				print('Yes')
				continue
		print('NO')
A()


for __ in range(int(input())):
	(A1, B1) = map(int, input().split())
	(A2, B2) = map(int, input().split())
	print(['No', 'Yes'][A1 == A2 and B1 + B2 == A1 or (A1 == B2 and B1 + A2 == A1) or (B1 == A2 and A1 + B2 == B1) or (B1 == B2 and A1 + A2 == B1)])


value = int(input())
for i in range(value):
	numbers = list(map(int, input().split()))
	a1 = numbers[0]
	b1 = numbers[1]
	numbers = list(map(int, input().split()))
	a2 = numbers[0]
	b2 = numbers[1]
	if a1 == a2 and b1 + b2 == a1:
		print('Yes')
	elif b1 == b2 and a1 + a2 == b1:
		print('Yes')
	elif b1 == a2 and a1 + b2 == b1:
		print('Yes')
	elif a1 == b2 and a2 + b1 == b2:
		print('Yes')
	else:
		print('No')


def solution(dim1, dim2):
	dim1.sort()
	dim2.sort()
	if dim1[1] != dim2[1]:
		return 'No'
	if dim1[0] + dim2[0] == dim1[1]:
		return 'Yes'
	else:
		return 'No'
tc = int(input())
for i in range(tc):
	dim1 = list(map(int, input().split()))
	dim2 = list(map(int, input().split()))
	print(solution(dim1, dim2))


for _ in range(int(input())):
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	a.sort()
	b.sort()
	f = 0
	if a[0] == b[0]:
		if a[0] == a[1] + b[1]:
			f += 1
	if a[1] == b[1]:
		if a[1] == a[0] + b[0]:
			f += 1
	if f == 0:
		print('No')
	else:
		print('Yes')


n = int(input())
while n > 0:
	(x1, y1) = [int(i) for i in input().split()]
	(x2, y2) = [int(i) for i in input().split()]
	if x1 == x2 and y1 + y2 == x1:
		print('Yes')
	elif x1 == y2 and x2 + y1 == x1:
		print('Yes')
	elif y1 == x2 and x1 + y2 == y1:
		print('Yes')
	elif y1 == y2 and x1 + x2 == y1:
		print('Yes')
	else:
		print('No')
	n = n - 1


I = input
for i in ' ' * int(I()):
	(n, m) = map(int, I().split())
	(a, b) = map(int, I().split())
	if max(n, m) == max(a, b) and min(n, m) + min(a, b) == max(a, b):
		print('Yes')
	else:
		print('No')


def answer(a, b, c, d):
	if a == c and b + d == a or (a == d and b + c == a) or (b == c and a + d == b) or (b == d and a + c == b):
		print('YES')
	else:
		print('NO')
t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	answer(a, b, c, d)


a = int(input())
b = []
while a > 0:
	array1 = list(map(int, input().split()))
	array2 = list(map(int, input().split()))
	if max(array1[1], array1[0]) == max(array2[0], array2[1]) and min(array1[1], array1[0]) + min(array2[0], array2[1]) == max(array1[0], array1[1]):
		m = array1[0] * array1[1] + array2[0] * array2[1]
		if m ** 0.5 == int(m ** 0.5):
			b.append('Yes')
		else:
			b.append('No')
	else:
		b.append('No')
	a -= 1
for i in b:
	print(i)


for i in range(int(input())):
	first = [int(_) for _ in input().split()]
	second = [int(_) for _ in input().split()]
	if len(set(first)) == 1 or len(set(second)) == 1:
		print('No')
	else:
		first.sort()
		second.sort()
		if first[0] + second[0] == first[1] and first[1] == second[1]:
			print('Yes')
		else:
			print('No')


import math
for _ in range(int(input())):
	(a, b) = list(map(int, input().split()))
	(x, y) = list(map(int, input().split()))
	s = a * b + x * y
	t = int(math.sqrt(s))
	if t * t == s:
		if (a == t or b == t) and (x == t or y == t):
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for i in range(t):
	s1 = [int(x) for x in input().split()]
	a = max(s1)
	b = min(s1)
	s2 = [int(x) for x in input().split()]
	c = max(s2)
	d = min(s2)
	if a == c and b + d == a:
		print('Yes')
	else:
		print('No')


t = int(input())
for tt in range(t):
	(a, b) = list(map(int, input().split()))
	(c, d) = list(map(int, input().split()))
	m = max(a, b)
	n = max(c, d)
	if m != n:
		print('NO')
	elif min(a, b) + min(c, d) == m:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(p, q) = map(int, input().split())
	(r, s) = map(int, input().split())
	if p == r and s + q == p or (q == s and r + p == q) or (q == r and s + p == q) or (p == s and q + r == s):
		print('Yes')
	else:
		print('No')


t = int(input())
for r in range(t):
	l = []
	(x, y) = [int(x) for x in input().split()]
	l.append(x)
	l.append(y)
	s = max(l)
	g = min(l)
	f = []
	(a, b) = [int(a) for a in input().split()]
	f.append(a)
	f.append(b)
	d = max(f)
	h = min(f)
	if s == d and h + g == s:
		print('YES')
	else:
		print('NO')


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
mod = 1000000007
import math
import bisect
abc = 'abcdefghijklmnopqrstuvwxyz'

def main():
	for _ in range(ii()):
		(a, b) = mi()
		(c, d) = mi()
		e = max(a, b)
		f = min(a, b)
		g = max(c, d)
		h = min(c, d)
		if e == g and f + h == e:
			print('Yes')
		else:
			print('No')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


for _ in range(int(input())):
	(a, b) = [int(x) for x in input().split()]
	(c, d) = [int(x) for x in input().split()]
	end = True
	for i in range(2):
		if a == c and b + d == a:
			print('Yes')
			end = False
			break
		elif a == d and b + c == a:
			print('Yes')
			end = False
			break
		(a, b) = (b, a)
	if end:
		print('No')


t = int(input())
i = 0
while i < t:
	i += 1
	(a, b) = list(map(int, input().split(' ')))
	(c, d) = list(map(int, input().split(' ')))
	if a == c and a == b + d:
		print('Yes')
	elif a == d and a == b + c:
		print('Yes')
	elif b == c and b == a + d:
		print('Yes')
	elif b == d and b == a + c:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(a1, a2) = input().split()
	a1 = int(a1)
	a2 = int(a2)
	(b1, b2) = input().split()
	b1 = int(b1)
	b2 = int(b2)
	if a1 < a2:
		x = a1
		a1 = a2
		a2 = x
	if b1 < b2:
		x = b1
		b1 = b2
		b2 = x
	if a1 != b1:
		print('No')
	elif a2 + b2 != a1:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	print('YES') if min(a) == abs(b[1] - b[0]) and max(a) == max(b) else print('NO')


set1 = []
set2 = []
ultimateSet = []
counter = 0
for _ in range(2 * int(input())):
	set1 = input().split(' ')
	set2.append([int(x) for x in set1])
	counter += 1
	if counter % 2 == 0:
		ultimateSet.append(set2)
		set2 = []
for x in ultimateSet:
	x[0].sort()
	x[1].sort()
	if x[0] == x[1]:
		if x[0][0] < x[0][1] and x[0][0] * 2 == x[0][1]:
			print('YES')
		elif x[0][0] > x[0][1] and x[0][1] * 2 == x[0][0]:
			print('YES')
		else:
			print('NO')
	else:
		inter = list(set(x[0]).intersection(set(x[1])))
		if len(inter) == 1:
			x[0].remove(inter[0])
			x[1].remove(inter[0])
			if x[0][0] + x[1][0] == inter[0]:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')


import math
from collections import defaultdict as dfc

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	l = []
	for p in range(2, n + 1):
		if prime[p]:
			l += [p]
	return l

def i1():
	return int(input())

def i2():
	return map(int, input().split())

def i3():
	return list(map(int, input().split()))

def i4():
	return input()
m = 2 ** 32

def check(a1, b1, a2, b2):
	if a1 + a2 == b1 and b1 == b2:
		return True
	else:
		return False
for _ in range(i1()):
	(a1, b1) = i2()
	(a2, b2) = i2()
	if a1 == a2 and b1 + b2 == a1:
		print('YES')
	elif a1 == b2 and a2 + b1 == a1:
		print('YES')
	elif b1 == a2 and b2 + a1 == b1:
		print('YES')
	elif b1 == b2 and a1 + a2 == b1:
		print('YES')
	else:
		print('NO')


INT_MAX = 10 ** 19 + 7
MOD = 10 ** 12 + 7

def INPUT():
	return list((int(i) for i in input().split()))

def LIST_1D_ARRAY(n):
	return [0 for _ in range(n)]

def LIST_2D_ARRAY(m, n):
	return [[0 for _ in range(n)] for _ in range(m)]
for _ in range(int(input())):
	(a, b) = INPUT()
	(c, d) = INPUT()
	if a > b:
		(a, b) = (b, a)
	if c > d:
		(c, d) = (d, c)
	if b == d and a + c == d:
		print('YES')
	else:
		print('NO')


from math import floor
from math import sqrt
numbertest = int(input())
for i in range(0, numbertest):
	rectangle1 = [int(x) for x in input().split()]
	rectangle1.sort()
	rectangle2 = [int(y) for y in input().split()]
	rectangle2.sort()
	if rectangle2[1] == rectangle1[1]:
		if int(rectangle1[0]) + int(rectangle2[0]) == int(rectangle2[1]) and int(rectangle1[0]) + int(rectangle2[0]) == int(rectangle1[1]):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


def main():
	test_cases = int(input())
	for _ in range(test_cases):
		(a1, b1) = [int(num) for num in input().split()]
		(a2, b2) = [int(num) for num in input().split()]
		(greater_side_1, smaller_side_1) = (max(a1, b1), min(a1, b1))
		(greater_side_2, smaller_side_2) = (max(a2, b2), min(a2, b2))
		if greater_side_1 != greater_side_2 or smaller_side_1 + smaller_side_2 != greater_side_1:
			print('No')
			continue
		print('Yes')
main()


n = int(input())
for _ in range(n):
	(l1, b1) = sorted(list(map(int, input().split())))
	(l2, b2) = sorted(list(map(int, input().split())))
	if b1 == b2 and b1 == l1 + l2:
		print('Yes')
	else:
		print('No')


def main():
	for _ in range(int(input())):
		(a, a1) = map(int, input().split())
		(b, b1) = map(int, input().split())
		if a == b and a1 + b1 == a:
			print('Yes')
		elif a == b1 and b + a1 == a:
			print('Yes')
		elif a1 == b and b1 + a == a1:
			print('Yes')
		elif a1 == b1 and b + a == a1:
			print('Yes')
		else:
			print('No')
main()


def square():
	for i in range(int(input())):
		a = list(map(int, input().split()))
		b = list(map(int, input().split()))
		if min(a) + min(b) == max(a) and min(a) + min(b) == max(b):
			print('Yes')
		else:
			print('No')
square()


t = int(input())
for it in range(t):
	(a1, b1) = [int(x) for x in input().split()]
	(a2, b2) = [int(x) for x in input().split()]
	if a1 == b1 or a2 == b2:
		print('NO')
		continue
	if a1 < b1:
		(a1, b1) = (b1, a1)
	if a2 < b2:
		(a2, b2) = (b2, a2)
	u1 = a1 == a2
	if u1:
		if b1 + b2 == a1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	c = 0
	flag = False
	if a1 == a2:
		c = b1 + b2
		if c == a1:
			flag = True
	if a1 == b2:
		c = a2 + b1
		if c == a1:
			flag = True
	if a2 == b1:
		c = a1 + b2
		if c == a2:
			flag = True
	if b1 == b2:
		c = a1 + a2
		if c == b1:
			flag = True
	if flag:
		print('Yes')
	else:
		print('No')


def square(a1, b1, a2, b2):
	if min(a1, b1) + min(a2, b2) == max(a1, b1) and max(a1, b1) == max(a2, b2):
		print('YES')
	else:
		print('NO')
for _ in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	square(a1, b1, a2, b2)


t = int(input())
for _ in range(t):
	A = list(map(int, input().split()))
	B = list(map(int, input().split()))
	A.sort()
	B.sort()
	if A[1] == B[1] and A[0] + B[0] == A[1]:
		print('Yes')
	else:
		print('No')


import sys
try:
	sys.stdin = open('Input.txt', 'r')
	sys.stdout = open('Output.txt', 'w')
except:
	pass
input = sys.stdin.readline
for testCases in range(int(input())):
	(a, b) = map(int, input().split())
	(a3, b3) = map(int, input().split())
	a1 = min(a, b)
	b1 = max(a, b)
	a2 = min(a3, b3)
	b2 = max(a3, b3)
	if a1 == a2 and b1 + b2 == a1:
		print('YES')
		continue
	elif b1 == b2 and a1 + a2 == b1:
		print('YES')
		continue
	print('NO')


n = int(input())
ans = list()
for i in range(n):
	l1 = input().split()
	a1 = int(l1[0])
	b1 = int(l1[1])
	l2 = input().split()
	a2 = int(l2[0])
	b2 = int(l2[1])
	if a1 == a2 and a1 == b1 + b2:
		ans.append('Yes')
	elif a1 == b2 and a1 == b1 + a2:
		ans.append('Yes')
	elif b1 == a2 and b1 == a1 + b2:
		ans.append('Yes')
	elif b1 == b2 and b1 == a1 + a2:
		ans.append('Yes')
	else:
		ans.append('No')
for j in ans:
	print(j)


t = int(input())
for i in range(t):
	a = list(map(int, input().split()))
	(a1, b1) = (a[0], a[1])
	a = list(map(int, input().split()))
	(a2, b2) = (a[0], a[1])
	B = False
	if a1 == a2 and b1 + b2 == a1 or (a1 == b2 and a2 + b1 == a1) or (a2 == b1 and a1 + b2 == a2) or (b1 == b2 and a1 + a2 == b1):
		B = True
	if B:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(a, b) = sorted(list(map(int, input().split())))
	(x, y) = sorted(list(map(int, input().split())))
	if a + x == b == y:
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	L1 = input().split()
	L2 = input().split()
	if int(L1[0]) + int(L2[0]) == int(L1[1]) and L1[1] == L2[1] or (int(L1[1]) + int(L2[0]) == int(L1[0]) and L1[0] == L2[1]) or (int(L1[1]) + int(L2[1]) == int(L1[0]) and L1[0] == L2[0]) or (int(L1[0]) + int(L2[1]) == int(L1[1]) and L1[1] == L2[0]):
		print('Yes')
	else:
		print('No')
	t -= 1


import sys
import math
az = int(input())
while az != 0:
	az -= 1
	b = input().split()
	a = int(b[0])
	c = int(b[1])
	b = input().split()
	a2 = int(b[0])
	c2 = int(b[1])
	if a + a2 == c and c == c2:
		print('Yes')
	elif a + c2 == c and c == a2:
		print('Yes')
	elif a2 + c == c2 and c2 == a:
		print('Yes')
	elif c2 + c == a2 and a2 == a:
		print('Yes')
	else:
		print('No')


import sys

def eprint(*args):
	print(*args, file=sys.stderr)
zz = 1
if zz:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('all.txt', 'w')
t = int(input())
while t > 0:
	t -= 1
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	(a1, b1) = (max(a1, b1), min(a1, b1))
	if a1 == a2 and b1 + b2 == a1 or (a1 == b2 and b1 + a2 == a1):
		print('Yes')
	else:
		print('No')


import math

def isPerfectSquare(x):
	if x >= 0:
		sr = math.sqrt(x)
		return sr * sr == x
	return false
for _ in range(int(input())):
	(a1, b1) = sorted(list(map(int, input().split())))
	(a2, b2) = sorted(list(map(int, input().split())))
	d = a2 * b2
	e = a1 * b1
	if a1 + a2 == b1 == b2:
		print('Yes')
	else:
		print('No')


p = int(input())
while p > 0:
	p = p - 1
	na = input()
	x = list()
	x = na.split()
	for i in range(0, len(x)):
		x[i] = int(x[i])
	ta = input()
	y = list()
	y = ta.split()
	for i in range(0, len(y)):
		y[i] = int(y[i])
	x.sort()
	y.sort()
	if x[0] + y[0] == x[1] and x[1] == y[1]:
		print('Yes')
	else:
		print('No')


t = int(input())
while t != 0:
	A = list(map(int, input().split()))
	B = list(map(int, input().split()))
	tmp = 0
	if A[0] == A[1] or B[0] == B[1]:
		tmp = 1
	elif max(A) != max(B):
		tmp = 1
	else:
		x = min(A)
		y = min(B)
		if x + y != max(A):
			tmp = 1
	if tmp == 1:
		print('No')
	else:
		print('Yes')
	t -= 1


def comp(x, y, w, z):
	return x == w and y + z == x or (x == z and y + w == x) or (y == w and z + x == y) or (y == z and x + w == y)

def solve():
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	print('YES' if comp(a1, b1, a2, b2) else 'NO')

def main():
	t = int(input())
	while t:
		solve()
		t -= 1
main()


[(lambda a, b, c, d, r: print('YES') if a * b + c * d in r and any([a == c == r.index(a * b + c * d), b == d == r.index(a * b + c * d), a == d == r.index(a * b + c * d), b == c == r.index(a * b + c * d)]) else print('NO'))(*map(int, input().split()), *map(int, input().split()), [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 2025, 2116, 2209, 2304, 2401, 2500, 2601, 2704, 2809, 2916, 3025, 3136, 3249, 3364, 3481, 3600, 3721, 3844, 3969, 4096, 4225, 4356, 4489, 4624, 4761, 4900, 5041, 5184, 5329, 5476, 5625, 5776, 5929, 6084, 6241, 6400, 6561, 6724, 6889, 7056, 7225, 7396, 7569, 7744, 7921, 8100, 8281, 8464, 8649, 8836, 9025, 9216, 9409, 9604, 9801, 10000, 10201, 10404, 10609, 10816, 11025, 11236, 11449, 11664, 11881, 12100, 12321, 12544, 12769, 12996, 13225, 13456, 13689, 13924, 14161, 14400, 14641, 14884, 15129, 15376, 15625, 15876, 16129, 16384, 16641, 16900, 17161, 17424, 17689, 17956, 18225, 18496, 18769, 19044, 19321, 19600, 19881]) for _ in range(int(input()))]


a = int(input())
for i in range(0, a):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	maxa = max(a, b)
	mina = min(a, b)
	maxb = max(c, d)
	minb = min(c, d)
	if maxa == maxb and mina + minb == maxa:
		print('YES')
	else:
		print('NO')


t = int(input())
(a, b) = ([], [])
for i in range(t):
	a = input().split()
	a[0] = int(a[0])
	a[1] = int(a[1])
	b = input().split()
	b[0] = int(b[0])
	b[1] = int(b[1])
	if max(a) != max(b):
		print('No')
	elif min(a) + min(b) == max(a):
		print('Yes')
	else:
		print('No')


l = [sorted(map(int, s.split())) for s in open(0)]
for ((a, b), (c, d)) in zip(l[1::2], l[2::2]):
	print('NYOE S'[b == d == a + c::2])


T = int(input())
for t in range(T):
	(a1, b1) = list(map(int, input().strip().split(' ')))
	(a2, b2) = list(map(int, input().strip().split(' ')))
	l1 = max(a1, b1)
	l2 = max(a2, b2)
	br1 = min(a1, b1)
	br2 = min(a2, b2)
	if br1 + br2 == l1 and br1 + br2 == l2:
		print('YES')
	else:
		print('NO')


from math import gcd, ceil
from collections import defaultdict as dd

def lcm(a, b):
	return a * b // gcd(a, b)

def inin():
	return int(input())

def inar():
	return list(map(int, input().split()))

def ar(element, size):
	return [element for i in range(size)]

def digitsum(num):
	su = 0
	while num:
		su += num % 10
		num //= 10
	return su

def pred(n, k, pointer):
	return pointer - k >= n

def yes():
	print('YES')

def no():
	print('NO')
for _ in range(inin()):
	a = inar()
	b = inar()
	a1 = min(a)
	b1 = max(a)
	a2 = min(b)
	b2 = max(b)
	if a1 + a2 == b1 == b2:
		yes()
	else:
		no()


from functools import reduce
import os
import sys
from collections import *
from math import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def arr():
	return [int(i) for i in input().split()]

def sarr():
	return [int(i) for i in input()]

def starr():
	return [str(x) for x in input().split()]

def inn():
	return int(input())

def svalue():
	return tuple(map(str, input().split()))

def parr():
	return [value() for i in range(n)]
mo = 1000000007
for _ in range(inn()):
	(a1, a2) = sorted(value())
	(b1, b2) = sorted(value())
	ans = 'Yes'
	if a2 != b2 or (a2 == b2 and a1 + b1 != a2):
		ans = 'No'
	print(ans)


test = int(input())
while test:
	test -= 1
	(n, m) = map(int, input().split())
	(n1, m1) = map(int, input().split())
	ans = False
	if n1 == n:
		if m1 + m == n:
			ans = True
	if n1 == m:
		if n + m1 == m:
			ans = True
	if m1 == n:
		if n1 + m == n:
			ans = True
	if m1 == m:
		if n + n1 == m:
			ans = True
	if ans:
		print('Yes')
	else:
		print('No')


tests = int(input())
answers = []
while tests > 0:
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	(a, b) = input().split()
	a = int(a)
	b = int(b)
	if max(x, y) == max(a, b) and max(x, y) == min(x, y) + min(a, b):
		answers.append('Yes')
	else:
		answers.append('No')
	tests -= 1
for i in answers:
	print(i)


def solve(x1, x2, x3, x4):
	if max(x1, x2) != max(x3, x4):
		return 'No'
	if min(x1, x2) + min(x3, x4) == max(x1, x2):
		return 'Yes'
	return 'No'
t = int(input())
for i in range(t):
	(x1, x2) = map(int, input().split(' '))
	(x3, x4) = map(int, input().split(' '))
	print(solve(x1, x2, x3, x4))


t = int(input())
for _ in range(t):
	(side1, side2) = sorted(list(map(int, input().split())))
	(side3, side4) = sorted(list(map(int, input().split())))
	if side2 == side4 and side1 + side3 == side2:
		print('Yes')
	else:
		print('No')


import math
for k in range(int(input())):
	(a, b) = list(map(int, input().split()))
	(c, d) = list(map(int, input().split()))
	s = a * b + c * d
	o = math.sqrt(s)
	n = int(o)
	if o % 1 == 0 and (o == a == c or o == a == d or o == b == c or (o == b == d)):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(a, b) = list(map(int, input().split()))
	(c, d) = list(map(int, input().split()))
	if a + c == b == d or a + d == b == c or b + c == a == d or (b + d == a == c):
		print('Yes')
	else:
		print('No')


import math
for j in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if max(a, b) == max(c, d):
		if min(a, b) + min(c, d) == max(a, b):
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
res = []
for _ in range(t):
	(a1, b1) = list(map(int, input().split()))
	(a2, b2) = list(map(int, input().split()))
	if a1 == a2 and b1 + b2 == a1:
		res.append('YES')
	elif a1 == b2 and b1 + a2 == a1:
		res.append('YES')
	elif b1 == a2 and a1 + b2 == a2:
		res.append('YES')
	elif b1 == b2 and a1 + a2 == b1:
		res.append('YES')
	else:
		res.append('NO')
for r in res:
	print(r)


for _ in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	ans = []
	if a1 == a2:
		ans.append('Yes' if a1 == b1 + b2 else 'No')
	if a1 == b2:
		ans.append('Yes' if a1 == a2 + b1 else 'No')
	if b1 == a2:
		ans.append('Yes' if b1 == a1 + b2 else 'No')
	if b1 == b2:
		ans.append('Yes' if b1 == a2 + a1 else 'No')
	if 'Yes' in ans:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	c = max(a1, b1)
	d = max(a2, b2)
	e = min(a1, b1)
	f = min(a2, b2)
	if c == d:
		g = e + f
		if g == c:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for _ in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 == a2 and max([a1, b2, a2, b2]) == a1:
		if b1 + b2 == a1:
			print('Yes')
		else:
			print('No')
	elif a1 == b2 and max([a1, b2, a2, b2]) == a1:
		if a2 + b1 == a1:
			print('Yes')
		else:
			print('No')
	elif b1 == a2 and max([a1, b2, a2, b2]) == b1:
		if a1 + b2 == b1:
			print('Yes')
		else:
			print('No')
	elif b1 == b2 and max([a1, b2, a2, b2]) == b1:
		if a1 + a2 == b1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())
p = 0
while p < t:
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 == a2 and b1 + b2 == a1 or (a1 == b2 and a2 + b1 == a1) or (b1 == a2 and a1 + b2 == b1) or (b1 == b2 and a1 + a2 == b1):
		print('Yes')
	else:
		print('No')
	p = p + 1


t = int(input())
for xx in range(t):
	(x1, y1) = map(int, input().split())
	(x2, y2) = map(int, input().split())
	t = max(x1, y1)
	fl = 0
	if t != max(x2, y2):
		fl = 1
	if min(x1, y1) + min(x2, y2) != t:
		fl = 1
	if fl == 1:
		print('NO')
	else:
		print('YES')


def main():
	import math
	t = int(input())
	n = [[[int(x) for x in input().split()], [int(x) for x in input().split()]] for i in range(t)]
	for o in n:
		if o[0][0] + o[1][0] == o[0][1] == o[1][1] or o[0][0] + o[1][1] == o[0][1] == o[1][0]:
			print('Yes')
			continue
		elif o[0][1] + o[1][0] == o[0][0] == o[1][1] or o[0][1] + o[1][1] == o[0][0] == o[1][0]:
			print('Yes')
			continue
		else:
			print('No')
main()


t = int(input())
for test in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a == b + c and a == d or (a == b + d and a == c) or (b == a + d and b == c) or (b == a + c and b == d):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	l1 = list(map(int, input().split()))
	l2 = list(map(int, input().split()))
	a1 = max(l1)
	b1 = min(l1)
	a2 = max(l2)
	b2 = min(l2)
	if a1 == a2 and b1 + b2 == a1:
		print('YES')
	else:
		print('NO')


tstr = input()
t = int(tstr)
ans = list()
for i in range(t):
	num1 = input().split()
	num2 = input().split()
	num1[0] = int(num1[0])
	num2[0] = int(num2[0])
	num1[1] = int(num1[1])
	num2[1] = int(num2[1])
	num1.sort()
	num2.sort()
	if num1[1] == num2[1] and num1[0] + num2[0] == num1[1]:
		ans.append('Yes')
	else:
		ans.append('No')
for i in range(t):
	print(ans[i])


t = int(input())
for tt in range(t):
	(p, q) = map(int, input().split())
	(r, s) = map(int, input().split())
	if q + s == p and r == p:
		print('YES')
	elif q + r == p and s == p:
		print('YES')
	elif p + s == q and q == r:
		print('YES')
	elif p + r == q and s == q:
		print('YES')
	else:
		print('NO')


t = int(input())
for test in range(t):
	flag = 0
	astr = input()
	bstr = input()
	alst = astr.split()
	blst = bstr.split()
	alst1 = list()
	blst1 = list()
	for i in alst:
		alst1.append(int(i))
	for ii in blst:
		blst1.append(int(ii))
	alst1.sort(reverse=True)
	blst1.sort(reverse=True)
	a1 = int(alst1[0])
	a2 = int(alst1[1])
	b1 = int(blst1[0])
	b2 = int(blst1[1])
	if a1 == b1:
		if a2 + b2 == a1:
			flag = 1
	else:
		flag = 0
	if flag == 1:
		print('Yes')
	else:
		print('No')


import sys
import math

def solve(a, b):
	for x in range(2):
		for y in range(2):
			if a[x] == b[y]:
				if int(a[abs(x - 1)]) + int(b[abs(y - 1)]) == int(a[x]):
					print('YES')
					return
	print('NO')

def main():
	a = list(sys.stdin)[1:]
	for x in range(1, len(a), 2):
		solve(a[x].split(), a[x - 1].split())
	return
main()


for i in range(int(input())):
	a = list((int(x) for x in input().split()))
	b = list((int(x) for x in input().split()))
	(x1, y1, x2, y2) = (a[0], a[1], b[0], b[1])
	if x1 == x2 and y1 + y2 == x1:
		print('Yes')
	elif x1 == y2 and y1 + x2 == x1:
		print('Yes')
	elif y1 == x2 and x1 + y2 == y1:
		print('Yes')
	elif y1 == y2 and x1 + x2 == y1:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	sum1 = a + d
	sum2 = a + c
	summ1 = b + d
	summ2 = b + c
	if sum1 == b == c or sum2 == d == b:
		print('YES')
	elif summ1 == a == c or summ2 == a == d:
		print('YES')
	else:
		print('NO')


from sys import stdin
inp = lambda : stdin.readline().strip()
t = int(inp())
for _ in range(t):
	(a1, b1) = [int(x) for x in inp().split()]
	(a2, b2) = [int(x) for x in inp().split()]
	if max(a1, b1) == max(a2, b2) and min(a1, b1) + min(a2, b2) == max(a1, b1):
		print('YES')
	else:
		print('NO')


t = int(input())

def solving(a1, b1, a2, b2):
	if not a1 == a2:
		return 'no'
	if not a1 == b1 + b2:
		return 'no'
	return 'yes'
for i in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	(a1, b1) = (max(a1, b1), min(a1, b1))
	(a2, b2) = (max(a2, b2), min(a2, b2))
	print(solving(a1, b1, a2, b2))


for _ in [0] * int(input()):
	(a, b) = sorted(map(int, input().split()))
	(c, d) = sorted(map(int, input().split()))
	print('YNEOS'[b != d or a + c != b::2])


for _ in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 >= b1:
		max1 = a1
		min1 = b1
	else:
		max1 = b1
		min1 = a1
	if a2 >= b2:
		max2 = a2
		min2 = b2
	else:
		max2 = b2
		min2 = a2
	mul = a1 * b1 + a2 * b2
	rt = pow(mul, 0.5)
	if rt * rt == mul and max1 == max2 and (min1 + min2 == max2):
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	flag = 0
	e = max(a, b) - min(a, b)
	if e == c or e == d:
		if max(a, b) == max(c, d):
			print('YES')
			flag = 1
	if flag == 0:
		print('NO')


for u in range(int(input())):
	(x, y) = map(int, input().split())
	(xx, yy) = map(int, input().split())
	if x == yy and xx + y == x:
		print('YES')
	elif y == xx and x + yy == y:
		print('YES')
	elif x == xx and y + yy == x:
		print('YES')
	elif y == yy and x + xx == y:
		print('YES')
	else:
		print('NO')


def solve():
	n = int(input())
	for i in range(n):
		(a, b) = sorted(map(int, input().split()))
		(c, d) = sorted(map(int, input().split()))
		if b == d and a + c == b:
			print('Yes')
		else:
			print('No')
	pass
solve()


import math, sys
from sys import stdin, stdout
from collections import Counter, defaultdict, deque
input = stdin.readline
I = lambda : int(input())
li = lambda : list(map(int, input().split()))

def case():
	(a, b) = li()
	(c, d) = li()
	(a, b) = (min(a, b), max(a, b))
	(c, d) = (min(c, d), max(c, d))
	if b == d and a + c == b:
		print('YES')
	else:
		print('NO')
for _ in range(int(input())):
	case()


I = lambda : sorted(map(int, input().split()))
for _ in range(int(input())):
	(a1, b1) = I()
	(a2, b2) = I()
	print('YES' if a1 + a2 == b1 == b2 else 'NO')


m = int(input())
n = 2
for i in range(m):
	one = [int(n) for n in input().split()]
	two = [int(n) for n in input().split()]
	(a1, b1) = (one[0], one[1])
	(a2, b2) = (two[0], two[1])
	if a1 == a2 and b1 + b2 == a1 or (b1 == b2 and a1 + a2 == b1) or (a1 == b2 and b1 + a2 == a1) or (a2 == b1 and a1 + b2 == a2):
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	inp1 = list(map(int, input().split()))
	inp2 = list(map(int, input().split()))
	inp1.sort()
	inp2.sort()
	if inp1[1] == inp2[1] and inp1[0] + inp2[0] == inp1[1]:
		print('Yes')
	else:
		print('No')
	t -= 1


for x in range(int(input())):
	(a, b, c, d) = sorted(list(map(int, input().split()))) + sorted(list(map(int, input().split())))
	print('YES' if a + c == b == d else 'NO')


for _ in range(int(input())):
	(a, b) = list(map(int, input().split()))
	(c, d) = list(map(int, input().split()))
	x = max(a, b)
	y = max(c, d)
	if x != y:
		print('No')
	elif min(a, b) + min(c, d) == x:
		print('Yes')
	else:
		print('No')


n = int(input())
for _ in range(n):
	r = list(map(int, input().split()))
	b = list(map(int, input().split()))
	r.sort(reverse=True)
	b.sort(reverse=True)
	br = 0
	l = 0
	if r[0] == b[0]:
		br = r[0]
	else:
		l = r[0] + b[0]
	if b[1] == r[1]:
		if br == 0:
			br = r[1]
		else:
			l = r[1] + b[1]
	else:
		l = r[1] + b[1]
	if l == br:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	flag = 0
	if a == c and b + d == a:
		flag = 1
	if a == d and b + c == a:
		flag = 1
	if b == c and a + d == b:
		flag = 1
	if b == d and a + c == b:
		flag = 1
	if flag == 1:
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from bisect import bisect_left
from bisect import bisect_right

def L():
	return list(map(int, stdin.readline().split()))

def In():
	return map(int, stdin.readline().split())

def I():
	return int(stdin.readline())
P = 1000000007

def main():
	for t in range(I()):
		lis1 = L()
		lis2 = L()
		lis1.sort()
		lis2.sort()
		if lis1[0] + lis2[0] == lis1[1] == lis2[1]:
			print('Yes')
		else:
			print('No')
main()


t = int(input())
for i in range(t):
	a = []
	x = input().split()
	for i in x:
		a.append(int(i))
	b = []
	x = input().split()
	for i in x:
		b.append(int(i))
	if max(a) == max(b) and min(a) + min(b) == max(a):
		print('Yes')
	else:
		print('No')


a = int(input())
for i in range(a):
	b = input().split()
	c = input().split()
	d = int(b[0])
	e = int(b[1])
	f = int(c[0])
	g = int(c[1])
	if min(d, e) + min(f, g) == max(d, e) and max(d, e) == max(g, f):
		print('Yes')
	else:
		print('No')


def solve():
	(x, y) = map(int, input().split())
	(p, q) = map(int, input().split())
	if max(x, y) != max(p, q):
		print('No')
	elif min(x, y) + min(p, q) == max(x, y):
		print('Yes')
	else:
		print('No')
for _ in range(int(input())):
	solve()


def square(a1, b1, a2, b2):
	if not set({a1, b1}) & set({a2, b2}):
		return 'NO'
	l = []
	if a1 in [a2, b2]:
		x = a1
		y = b1
		if a1 == a2:
			y += b2
		elif a1 == b2:
			y += a2
		l.append([x, y])
	if b1 in [a2, b2]:
		x = a1
		y = b1
		if b1 == a2:
			x += b2
		elif b1 == b2:
			x += a2
		l.append([x, y])
	for i in l:
		if i[0] == i[1]:
			return 'YES'
	else:
		return 'NO'
t = int(input())
for _ in range(t):
	a1b1 = input().split()
	a2b2 = input().split()
	a1 = int(a1b1[0])
	b1 = int(a1b1[1])
	a2 = int(a2b2[0])
	b2 = int(a2b2[1])
	print(square(a1, b1, a2, b2))


t = int(input())
rec = []
for i in range(t):
	(a1, b1) = input().split()
	(a1, b1) = (int(a1), int(b1))
	(a2, b2) = input().split()
	(a2, b2) = (int(a2), int(b2))
	rec.append([[a1, b1], [a2, b2]])
for r in rec:
	if r[0][0] == r[1][0] and r[0][1] + r[1][1] == r[0][0] or (r[0][0] == r[1][1] and r[0][1] + r[1][0] == r[0][0]) or (r[0][1] == r[1][0] and r[0][0] + r[1][1] == r[0][1]) or (r[0][1] == r[1][1] and r[0][0] + r[1][0] == r[0][1]):
		print('YES')
	else:
		print('NO')


for __ in range(int(input())):
	(a, b) = map(int, input().split())
	(x, y) = map(int, input().split())
	if a == x and b + y == x:
		print('Yes')
	elif a == y and b + x == y:
		print('Yes')
	elif b == x and a + y == x:
		print('Yes')
	elif b == y and a + x == y:
		print('Yes')
	else:
		print('No')


import math
import sys
input = sys.stdin.readline

def inp():
	return int(input())

def invr():
	return list(map(int, input().split()))
t = inp()
while t > 0:
	(a, b) = invr()
	(c, d) = invr()
	o = [a == c and a == d + b, a == d and a == c + b, b == c and b == d + a, b == d and b == c + a]
	oo = o[0]
	for x in range(1, 4):
		oo = oo or o[x]
	print('YES' if oo else 'NO')
	t -= 1


w = int(input())
a = []
if w >= 1 and w <= 10000:
	for i in range(0, 2 * w):
		p = input().split(' ')
		a.append(p)
	for i in range(1, 2 * w, 2):
		r = a[i - 1] + a[i]
		if int(r[0]) + int(r[2]) == int(r[1]) and int(r[0]) + int(r[2]) == int(r[3]):
			print('YES')
		elif int(r[0]) + int(r[3]) == int(r[1]) and int(r[0]) + int(r[3]) == int(r[2]):
			print('YES')
		elif int(r[1]) + int(r[2]) == int(r[0]) and int(r[1]) + int(r[2]) == int(r[3]):
			print('YES')
		elif int(r[1]) + int(r[3]) == int(r[0]) and int(r[1]) + int(r[3]) == int(r[2]):
			print('YES')
		else:
			print('NO')


n = int(input())
i = 0
while i < n:
	i += 1
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a + c == b and b == d:
		print('YES')
	elif b + c == a and a == d:
		print('YES')
	elif a + d == c and b == c:
		print('YES')
	elif b + d == a and a == c:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	rectangle1 = sorted(list(map(int, input().strip().split())))
	rectangle2 = sorted(list(map(int, input().strip().split())))
	if rectangle1[0] + rectangle2[0] == rectangle1[1] and rectangle1[1] == rectangle2[1]:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	(a1, b1) = map(int, input().split())
	if a == b or a1 == b1:
		print('No')
	else:
		q = [a, b, a1, b1]
		q.sort()
		if q[0] == q[1] and q[2] + q[3] == q[0] or (q[2] == q[1] and q[0] + q[3] == q[2]) or (q[2] == q[3] and q[0] + q[1] == q[2]):
			print('Yes')
		else:
			print('No')


t = int(input())
for i in range(t):
	ain = list(input())
	a = []
	redunt = ''
	for item in range(len(ain)):
		if ain[item] == ' ':
			a.append(redunt)
			redunt = ''
		else:
			redunt += ain[item]
			if item == len(ain) - 1:
				a.append(redunt)
	bin = list(input())
	b = []
	redunt = ''
	for item in range(len(bin)):
		if bin[item] == ' ':
			b.append(redunt)
			redunt = ''
		else:
			redunt += bin[item]
			if item == len(bin) - 1:
				b.append(redunt)
	a[0] = int(a[0])
	a[1] = int(a[1])
	b[0] = int(b[0])
	b[1] = int(b[1])
	if a[0] > a[1]:
		agrt = a[0]
		amin = a[1]
	elif a[0] < a[1]:
		agrt = a[1]
		amin = a[0]
	else:
		agrt = 'null'
	if b[0] > b[1]:
		bgrt = b[0]
		bmin = b[1]
	elif b[0] < b[1]:
		bgrt = b[1]
		bmin = b[0]
	else:
		bgrt = 'null'
	if agrt != 'null' and bgrt != 'null':
		if agrt == bgrt:
			if amin + bmin == agrt:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')
	else:
		print('NO')


def compare_lists(test):
	add_list = [x + y for (x, y) in zip(*test)]
	if add_list[0] == add_list[1] * 2 and test[0][0] == test[1][0] or (add_list[1] == add_list[0] * 2 and test[0][1] == test[1][1]):
		return True
	else:
		return False

def square_tst(test):
	if compare_lists(test):
		return True
	else:
		test[0].reverse()
		if compare_lists(test):
			return True
		return False
count = int(input())
test_cases = []
for i in range(count):
	in1 = list(map(lambda x: int(x), input().strip().split(' ')))
	in2 = list(map(lambda x: int(x), input().strip().split(' ')))
	test_cases.append([in1, in2])
for test in test_cases:
	if square_tst(test):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	com = []
	arr1 = list(map(int, input().split()))
	arr2 = list(map(int, input().split()))
	flag = 0
	for j in range(2):
		for k in range(2):
			if arr1[j] == arr2[k]:
				com.append(arr1[j])
	sume = 0
	come = 0
	if len(com) == 0:
		flag = 0
	if len(com) == 1:
		come = com[0]
		flag = 1
	if len(com) == 2:
		come = max(com)
		flag = 1
	if flag == 1:
		for j in range(2):
			if arr1[j] != come:
				sume += arr1[j]
		for j in range(2):
			if arr2[j] != come:
				sume += arr2[j]
		if sume == come:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for _ in range(int(input())):
	(w1, h1) = map(int, input().split())
	(w2, h2) = map(int, input().split())
	if w1 > h1:
		(w1, h1) = (h1, w1)
	if w2 > h2:
		(w2, h2) = (h2, w2)
	print('YES' if h1 == h2 and w1 + w2 == h1 else 'NO')


import math
for i in range(int(input())):
	(x, y) = map(int, input().split())
	(c, z) = map(int, input().split())
	print('Yes' if min(x, y) + min(z, c) == max(x, y) and max(z, c) == max(x, y) else 'No')


import math
for ii in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	l1 = [a1, b1]
	l2 = [a2, b2]
	l1 = sorted(l1, reverse=True)
	l2 = sorted(l2, reverse=True)
	if l1[0] == l2[0] and l1[0] == l1[1] + l2[1] and (l1[1] + l2[1] == l2[0]):
		print('YES')
	else:
		print('NO')


t = int(input())
for q in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a + d == c and c == b or (c + b == a and a == d) or (b + d == a and a == c) or (a + c == b and b == d):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(a1, b1) = input().split()
	(a2, b2) = input().split()
	area = int(a1) * int(b1) + int(a2) * int(b2)
	i = 1
	while i * i <= area:
		i += 1
	i -= 1
	if i * i == area:
		if max(int(a1), int(b1)) == max(int(a2), int(b2)):
			if max(int(a1), int(b1)) == i:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')
	else:
		print('NO')


import sys
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 + a2 == b1 and b1 == b2 or (a2 + b1 == a1 and a1 == b2) or (a2 + b1 == b2 and b2 == a1) or (a1 + a2 == b2 and b2 == b1) or (a1 + b2 == b1 and b1 == a2) or (b1 + b2 == a1 and a1 == a2) or (b1 + b2 == a2 and a1 == a2) or (a1 + b2 == a2 and a2 == b1):
		print('YES')
	else:
		print('NO')


import sys
R = lambda : sorted(map(int, sys.stdin.readline().split()))
(t,) = R()
for _ in [0] * t:
	(a, b) = R()
	(c, d) = R()
	print('NYOE S'[b == d == a + c::2])


from sys import stdin
import math
inp = lambda : stdin.readline().strip()
t = int(inp())
for i in range(t):
	(a, b) = [int(x) for x in input().split()]
	(x, y) = [int(x) for x in input().split()]
	if a == x:
		test = a
		if b + y == a:
			print('YES')
			continue
	if a == y:
		test = a
		if b + x == a:
			print('YES')
			continue
	if b == x:
		test = b
		if a + y == b:
			print('YES')
			continue
	if b == y:
		test = b
		if a + x == b:
			print('YES')
			continue
	print('NO')


import math
t = int(input())
for i in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	flag = 0
	if a1 == a2 and b1 + b2 == a1:
		flag = 1
	elif a1 == b2 and a2 + b1 == a1:
		flag = 1
	elif b1 == b2 and a2 + a1 == b1:
		flag = 1
	elif b1 == a2 and a1 + b2 == a2:
		flag = 1
	if flag == 1:
		print('yes')
	else:
		print('no')


for _ in range(int(input())):
	t1 = list(map(int, input().split()))
	t2 = list(map(int, input().split()))
	m1 = min(t1)
	m2 = min(t2)
	p1 = max(t1)
	p2 = max(t2)
	if m1 + m2 == p1 and p1 == p2 and (m1 != p1) and (m2 != p2):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(a, b) = [int(x) for x in input().split()]
	(c, d) = [int(x) for x in input().split()]
	if min(a, b) + min(c, d) == max(a, b) and min(a, b) + min(c, d) == max(c, d):
		print('YES')
	else:
		print('NO')


def solve(a, b, c, d):
	if a + c == b and b == d:
		return 'Yes'
	elif b + d == c and c == a:
		return 'Yes'
	elif b + c == a and d == a:
		return 'Yes'
	elif a + d == c and c == b:
		return 'Yes'
	else:
		return 'No'
t = int(input())
for _ in range(t):
	(a, b) = list(map(int, input().split()))
	(c, d) = list(map(int, input().split()))
	print(solve(a, b, c, d))


num = int(input())
for i in range(num):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	l1 = sorted([a1, b1])
	l2 = sorted([a2, b2])
	if l1[0] == l2[0] and l1[1] + l2[1] == l1[0] or (l1[1] == l2[1] and l1[0] + l2[0] == l1[1]):
		print('YES')
	else:
		print('NO')


t = int(input())
for tests in range(0, t):
	(a, b) = input().split()
	(c, d) = input().split()
	a = int(a)
	b = int(b)
	c = int(c)
	d = int(d)
	if a > b:
		(a, b) = (b, a)
	if c > d:
		(c, d) = (d, c)
	if b == d and a + c == b:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	r1 = list(map(int, input().split()))
	r2 = list(map(int, input().split()))
	c = False
	if r1[0] in r2:
		if r1[0] == r2[0]:
			if r1[1] + r2[1] == r1[0]:
				c = True
		elif r1[0] == r2[1]:
			if r1[1] + r2[0] == r1[0]:
				c = True
	if c:
		print('YES')
		continue
	if r1[1] in r2:
		if r1[1] == r2[0]:
			if r1[0] + r2[1] == r1[1]:
				c = True
		elif r1[1] == r2[1]:
			if r1[0] + r2[0] == r1[1]:
				c = True
	if c:
		print('YES')
	else:
		print('NO')


def is_a_square(el1, el2):
	res = 0
	if el1[0] == el2[0]:
		if el1[1] + el2[1] == el1[0]:
			res = 1
	if el1[0] == el2[1]:
		if el1[1] + el2[0] == el1[0]:
			res = 1
	if el1[1] == el2[1]:
		if el1[0] + el2[0] == el1[1]:
			res = 1
	if el1[1] == el2[0]:
		if el1[0] + el2[1] == el1[1]:
			res = 1
	if res == 1:
		print('YES')
	else:
		print('NO')
n = int(input())
c = [[0] * 2] * n
b = [[0] * 2] * n
for i in range(n):
	c[i] = list(map(int, input().split()))
	b[i] = list(map(int, input().split()))
for i in range(n):
	is_a_square(c[i], b[i])


t = int(input())
for i in range(t):
	s = input().split()
	a = int(s[0])
	b = int(s[1])
	s2 = input().split()
	a2 = int(s2[0])
	b2 = int(s2[1])
	if a + a2 == b and b == b2 or (b + a2 == b2 and a == b2):
		print('YES')
	elif a + b2 == b and b == a2 or (b + b2 == a and a == a2):
		print('YES')
	else:
		print('NO')


s = []
for jj in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if min(a1, b1) + min(a2, b2) == max(a1, b1) and max(a1, b1) == max(a2, b2):
		s.append('Yes')
	else:
		s.append('No')
for i in s:
	print(i)


t = int(input())
for i in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	valid = False
	if a1 == a2 and b1 + b2 == a1:
		valid = True
	if a1 == b2 and b1 + a2 == a1:
		valid = True
	if b1 == a2 and a1 + b2 == b1:
		valid = True
	if b1 == b2 and a1 + a2 == b1:
		valid = True
	if valid:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(a, b) = list(map(int, input().split()))
	(c, d) = list(map(int, input().split()))
	e = min(a, b) + min(c, d)
	if max(a, b) == max(c, d):
		if e == max(a, b):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for t in range(int(input())):
	(a1, b1) = [int(x) for x in input().split()]
	(a2, b2) = [int(x) for x in input().split()]
	ok = False
	if max(a1, b1) == min(a1, b1) + min(a2, b2) and max(a1, b1) == max(a2, b2):
		ok = True
	if ok:
		print('Yes')
	else:
		print('No')


def func():
	(a, b) = map(int, input().split())
	(x, y) = map(int, input().split())
	c = 0
	if a == x and b + y == x:
		c = 1
	elif a == y and b + x == y:
		c = 1
	elif b == x and a + y == x:
		c = 1
	elif b == y and a + x == y:
		c = 1
	return c
n = int(input())
for i in range(n):
	if func():
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(x, y) = map(int, input().split())
	f = -1
	if a == x:
		if b + y == a:
			f = 1
	if a == y:
		if b + x == a:
			f = 1
	if b == x:
		if a + y == b:
			f = 1
	if b == y:
		if a + x == b:
			f = 1
	if f == 1:
		print('Yes')
	else:
		print('No')


q = int(input())
for _ in range(q):
	(a, b) = list(map(int, input().split()))
	(c, d) = list(map(int, input().split()))
	(a, b) = (min(a, b), max(a, b))
	(c, d) = (min(c, d), max(c, d))
	if b == d and a + c == b:
		print('Yes')
	else:
		print('No')


def solve():
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if a1 == a2:
		if b1 + b2 == a1:
			return 'Yes'
	if a1 == b2:
		if a2 + b1 == a1:
			return 'Yes'
	if b1 == a2:
		if b2 + a1 == b1:
			return 'Yes'
	if b1 == b2:
		if a1 + a2 == b1:
			return 'Yes'
	return 'No'
numcases = int(input())
for i in range(numcases):
	print(solve())


t = int(input())
for i in range(t):
	first = list(map(int, input().split()))
	second = list(map(int, input().split()))
	if max(first) == max(second) and min(first) + min(second) == max(first):
		print('Yes')
	else:
		print('No')


t = int(input())
output = []
for _ in range(t):
	(a1, b1) = [int(r) for r in input().split()]
	(a2, b2) = [int(r) for r in input().split()]
	w1 = max(a1, b1)
	h1 = min(a1, b1)
	w2 = max(a2, b2)
	h2 = min(a2, b2)
	if w1 == w2 and h1 + h2 == w1:
		output.append('Yes')
	else:
		output.append('No')
print('\n'.join(output))


t = int(input())
for i in range(t):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	n = min(a) + min(b)
	m = max(a)
	l = max(b)
	if n == m == l:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	p = input().split()
	a = int(p[0])
	b = int(p[1])
	q = input().split()
	c = int(q[0])
	d = int(q[1])
	if a == c and c == b + d or (a == d and a == b + c) or (b == c and b == a + d) or (b == d and b == a + c):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	d = list(map(int, input().split()))
	e = list(map(int, input().split()))
	if max(d) == max(e):
		if min(d) + min(e) == max(e):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


from sys import stdin, stdout
import bisect

def st():
	return list(stdin.readline().strip())

def inp():
	return int(stdin.readline())

def li():
	return list(map(int, stdin.readline().split()))

def mp():
	return map(int, stdin.readline().split())

def pr(n):
	stdout.write(str(n) + '\n')

def soe(limit):
	l = [1] * (limit + 1)
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
			n = n - 1
		else:
			a = a * a
			n = n >> 1
	return r

def solve():
	for i in range(inp()):
		(a, b) = mp()
		(x, y) = mp()
		(c, d) = (max(a, b), max(x, y))
		(e, f) = (min(a, b), min(x, y))
		if c != d:
			pr('No')
		elif e + f != c:
			pr('No')
		else:
			pr('Yes')
for _ in range(1):
	solve()


def answer(t):
	for i in range(t):
		ab = input().split()
		(a, b) = (int(ab[0]), int(ab[1]))
		ab1 = input().split()
		(a2, b2) = (int(ab1[0]), int(ab1[1]))
		print('YES' if max(a, b) == max(a2, b2) and min(a, b) + min(a2, b2) == max(a, b) else 'NO')
answer(int(input()))


import math
from collections import Counter, deque
L = lambda : list(map(int, input().split()))
M = lambda : map(int, input().split())
I = lambda : int(input())
IN = lambda : input()
mod = 10 ** 9 + 7

def s(a):
	print(' '.join(list(map(str, a))))
for i in range(I()):
	(a, b) = M()
	(c, d) = M()
	x = min(a, b)
	y = max(a, b)
	p = min(c, d)
	q = max(c, d)
	if y == q and x + p == y:
		print('YES')
	else:
		print('NO')


t = int(input())
for u in range(t):
	temp = list(map(int, input().rstrip().split()))
	temp1 = list(map(int, input().rstrip().split()))
	a = temp[0]
	b = temp[1]
	a1 = temp1[0]
	b1 = temp1[1]
	if a > b and a1 > b1 and (a == a1) and (a == b + b1):
		print('YES')
	elif a < b and a1 < b1 and (b == b1) and (b == a + a1):
		print('YES')
	elif a > b and a1 < b1 and (a == b1) and (a == b + a1):
		print('YES')
	elif a < b and a1 > b1 and (a1 == b) and (a1 == b1 + a):
		print('YES')
	else:
		print('NO')


t = int(input())
if 1 <= t <= 10 ** 4:
	for i in range(t):
		(a, b) = input().split()
		(c, d) = input().split()
		a = int(a)
		b = int(b)
		c = int(c)
		d = int(d)
		if a + c == b and a + c == d:
			print('yes')
		elif a + d == b and a + d == c:
			print('yes')
		elif b + c == a and b + c == d:
			print('yes')
		elif b + d == a and b + d == c:
			print('yes')
		else:
			print('no')


for t in range(int(input())):
	(l, m) = map(int, input().split())
	(k, h) = map(int, input().split())
	if l == k and h + m == l:
		print('Yes')
	elif l == h and k + m == l:
		print('Yes')
	elif m == k and l + h == m:
		print('Yes')
	elif m == h and l + k == m:
		print('Yes')
	else:
		print('No')


import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
import sys

def query(a, b, c, d):
	if a == c:
		if b + d == a:
			return 'Yes'
	if a == d:
		if b + c == a:
			return 'Yes'
	if b == c:
		if a + d == b:
			return 'Yes'
	if b == d:
		if a + c == b:
			return 'Yes'
	return 'No'

def main():
	t = int(input())
	for _ in range(t):
		(a, b) = map(int, input().split())
		(c, d) = map(int, input().split())
		ans = query(a, b, c, d)
		sys.stdout.write(ans + '\n')
main()


def check_status(a1, b1, a2, b2):
	if a2 == a1:
		if b1 + b2 == a2:
			return True
		else:
			return False
t = int(input())
while t:
	t -= 1
	(a1, b1) = input().split()
	a1 = int(a1)
	b1 = int(b1)
	(a2, b2) = input().split()
	a2 = int(a2)
	b2 = int(b2)
	if check_status(a1, b1, a2, b2) or check_status(a1, b1, b2, a2) or check_status(b1, a1, a2, b2) or check_status(b1, a1, b2, a2):
		print('Yes')
	else:
		print('No')


N = int(input())
for i in range(N):
	ab = [int(x) for x in input().split()]
	cd = [int(x) for x in input().split()]
	ab.sort()
	cd.sort()
	if ab[1] == cd[1] and ab[0] + cd[0] == ab[1]:
		print('Yes')
	else:
		print('No')


import sys
import math
from collections import defaultdict

def solve(test):
	(l1, b1) = map(int, input().split())
	(l2, b2) = map(int, input().split())
	pos1 = l1 + l2 == b1 and b1 == b2
	pos2 = l1 + b2 == b1 and b1 == l2
	pos3 = b1 + l2 == l1 and l1 == b2
	pos4 = b1 + b2 == l1 and l1 == l2
	if pos1 or pos2 or pos3 or pos4:
		print('Yes')
	else:
		print('No')
test_cases = int(input())
for t in range(1, test_cases + 1):
	solve(t)


import math
t = int(input())
cos = []
for i in range(0, t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	k = a * b + c * d
	m = math.sqrt(k)
	if m == int(math.sqrt(k)):
		if max(a, b) == max(c, d):
			cos.append('Yes')
		else:
			cos.append('No')
	else:
		cos.append('No')
for p in range(0, len(cos)):
	print(cos[p])


t = int(input())
for i in range(t):
	(xa, xb) = input().split(' ')
	(xc, xd) = input().split(' ')
	a = int(xa)
	b = int(xb)
	c = int(xc)
	d = int(xd)
	temp = 0
	if a > b:
		temp = a
		a = b
		b = temp
	if c > d:
		temp = c
		c = d
		d = temp
	if a + c == b and a + c == d:
		print('Yes')
	else:
		print('No')


import math
for _ in [0] * int(input()):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if a == c and b + d == a or (a == d and c + b == a) or (b == c and a + d == c) or (b == d and a + c == d):
		print('YES')
	else:
		print('NO')


T = int(input())
for i in range(T):
	n = list(map(int, input().split()))
	n1 = list(map(int, input().split()))
	n.sort()
	n1.sort()
	a = n[0] + n1[0]
	if a == max(n) and a == max(n1):
		print('Yes')
	else:
		print('No')


n = int(input())
for _ in range(0, n):
	(a1, a2) = sorted(map(int, input().split()))
	(b1, b2) = sorted(map(int, input().split()))
	if a2 == b2:
		if a2 == a1 + b1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


import sys
q = int(input())
I = lambda : list(map(int, input().split()))
for tc in range(q):
	a = I()
	b = I()
	x = max(a)
	y = max(b)
	if min(a) + min(b) == max(a) and max(a) == max(b):
		print('Yes')
	else:
		print('No')


t = int(input())
for x in range(t):
	s1 = list(map(int, input().split()))
	s2 = list(map(int, input().split()))
	if max(s1) == max(s2) and min(s1) + min(s2) == max(s1):
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	r1 = a1 * b1
	r2 = a2 * b2
	if max(a1, b1) == max(a2, b2):
		s = max(a1, b1)
		if min(a1, b1) + min(a2, b2) == s:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


import sys, re, math
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from heapq import heappush, heappop, heapify, nlargest, nsmallest

def STR():
	return list(input())

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST():
	return list(map(int, input().split()))

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def sortListWithIndex(listOfTuples, idx):
	return sorted(listOfTuples, key=lambda x: x[idx])

def sortDictWithVal(passedDic):
	temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))[::-1]
	toret = {}
	for tup in temp:
		toret[tup[0]] = tup[1]
	return toret

def sortDictWithKey(passedDic):
	return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
t = INT()
while t != 0:
	(a1, b1) = MAP()
	(a2, b2) = MAP()
	if b1 + b2 == a1 and b1 + b2 == a2 or (b1 + a2 == a1 and b1 + a2 == b2) or (a1 + b2 == b1 and a1 + b2 == a2) or (a1 + a2 == b1 and a1 + a2 == b2):
		print('Yes')
	else:
		print('No')
	t -= 1


from collections import Counter
from collections import defaultdict
import math
import sys
input = sys.stdin.readline
rs = lambda : input().strip()
ri = lambda : int(input())
rl = lambda : list(map(int, input().split()))
rls = lambda : list(map(str, input().split()))
from collections import deque
t = int(input())
for _ in range(0, t):
	(a1, b1) = rl()
	(a2, b2) = rl()
	a = set()
	a.add(a1)
	a.add(b1)
	b = set()
	b.add(a2)
	b.add(b2)
	c = a.intersection(b)
	c = list(c)
	if len(c) == 2:
		if min(a1, b1) + min(a2, b2) == max(a1, b1):
			print('Yes')
		else:
			print('No')
	elif len(c) == 1:
		if a1 + b1 + a2 + b2 - c[0] == 2 * c[0]:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


MOD = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
from collections import *
for _ in range(ii()):
	(a, b) = f()
	(c, d) = f()
	if a + c == b == d or a + d == c == b or b + c == d == a or (b + d == a == c):
		print('Yes')
	else:
		print('No')


import sys
import os
import time
import collections
from collections import Counter, deque
import itertools
import math
import timeit
import random
import string

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	divisors = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				divisors.append(i)
			else:
				divisors.extend([i, n // i])
	return divisors

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def flin(d, x, default=-1):
	left = right = -1
	for i in range(len(d)):
		if d[i] == x:
			if left == -1:
				left = i
			right = i
	if left == -1:
		return (default, default)
	else:
		return (left, right)

def ceil(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def prr(a, sep=' '):
	print(sep.join(map(str, a)))

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)
for _ in range(ii()):
	(a, b) = sorted(mi())
	(c, d) = sorted(mi())
	print('No') if b != d or a + c != b else print('Yes')


import sys
input = sys.stdin.buffer.readline
t = int(input())
while t:
	t -= 1
	(a, b) = map(int, input().split())
	(x, y) = map(int, input().split())
	mx1 = max(a, b)
	mn1 = min(a, b)
	mx2 = max(x, y)
	mn2 = min(x, y)
	if mx1 == mx2 == mn1 + mn2:
		print('YES')
	else:
		print('NO')


import io
import os
from collections import Counter, defaultdict, deque

def solve(A1, B1, A2, B2):
	if A1 == A2 == B1 + B2 or A1 == B2 == B1 + A2 or B1 == A2 == A1 + B2 or (B1 == B2 == A1 + A2):
		return 'Yes'
	return 'No'
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
T = int(input())
for t in range(T):
	(A1, B1) = [int(x) for x in input().split()]
	(A2, B2) = [int(x) for x in input().split()]
	ans = solve(A1, B1, A2, B2)
	print(ans)


import copy
t = int(input())
x = []
for i in range(t):
	isSquare = False
	a1 = [int(j) for j in input().split()]
	a2 = [int(j) for j in input().split()]
	a1.sort()
	a2.sort()
	if a1[0] + a2[0] == a1[1] and a1[1] == a2[1]:
		isSquare = True
	if isSquare:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	a = input().split()
	b = input().split()
	if int(a[0]) == int(b[0]) and int(a[1]) + int(b[1]) == int(a[0]):
		print('YES')
	elif int(a[0]) == int(b[1]) and int(a[1]) + int(b[0]) == int(a[0]):
		print('YES')
	elif int(a[1]) == int(b[0]) and int(a[0]) + int(b[1]) == int(a[1]):
		print('YES')
	elif int(a[1]) == int(b[1]) and int(a[0]) + int(b[0]) == int(a[1]):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	a = min(a1, b1)
	b = min(a2, b2)
	if a + b == max(a1, b1) and max(a1, b1) == max(a2, b2):
		print('YES')
	else:
		print('NO')


n = int(input())
for _ in range(n):
	(a, b) = input().strip().split()
	(c, d) = input().strip().split()
	(a, b, c, d) = map(int, (a, b, c, d))
	res = any((a == c == b + d, a == d == b + c, b == c == a + d, b == d == a + c))
	print('Yes' if res else 'No')


t = int(input())
for x in range(t):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	if a[0] == b[0] and a[0] == a[1] + b[1]:
		print('Yes')
	elif a[0] == b[1] and a[0] == a[1] + b[0]:
		print('Yes')
	elif a[1] == b[0] and a[1] == a[0] + b[1]:
		print('Yes')
	elif a[1] == b[1] and a[1] == a[0] + b[0]:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	x = [int(x) for x in input().split()]
	x.sort()
	(a, b) = input().split()
	a = int(a)
	b = int(b)
	if a == x[-1]:
		if x[0] + b == a:
			print('YES')
		else:
			print('NO')
	elif b == x[-1]:
		if x[0] + a == b:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	(a1, b1) = map(int, input().split(' '))
	(a2, b2) = map(int, input().split(' '))
	side1 = max(a1, b1)
	side2 = max(a2, b2)
	if side1 != side2:
		print('No')
	elif min(a1, b1) + min(a2, b2) == side1:
		print('Yes')
	else:
		print('No')


t = int(input())
count = 0
while count < t:
	count += 1
	l1 = list(map(int, input().split(' ')))
	l2 = list(map(int, input().split(' ')))
	add = min(l1)
	add2 = min(l2)
	target = max(l1)
	target2 = max(l2)
	if target == target2:
		if add + add2 == target:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


def getLines(num):
	inputLines = []
	for i in range(0, num):
		line = input()
		if line:
			inputLines.append(line)
		else:
			break
	return inputLines

def notZeroPow(num, p):
	return True if num >= 1 and num <= pow(10, p) else False

def isRectangle(a, b, c, d):
	if a == d and b + c == a:
		return True
	elif b == c and a + d == b:
		return True
	elif a == c and b + d == a:
		return True
	elif b == d and a + c == b:
		return True
	return False
readCount = int(input())
if notZeroPow(readCount, 4):
	lines = getLines(readCount * 2)
	results = []
	if len(lines) > 0:
		for i in range(0, len(lines), 2):
			arr = lines[i].split()
			arr2 = lines[i + 1].split()
			results.append(isRectangle(int(arr[0]), int(arr[1]), int(arr2[0]), int(arr2[1])))
	for e in results:
		print('Yes' if e else 'No')


testcases = int(input())
for i in range(testcases):
	(a, b) = list(map(int, input().split()))
	(a1, b1) = list(map(int, input().split()))
	if a + b1 == b and a + b1 == a1:
		print('Yes')
	elif b + a1 == a and b + a1 == b1:
		print('Yes')
	elif b + b1 == a and b + b1 == a1:
		print('Yes')
	elif a + a1 == b and a + a1 == b1:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	c = 0
	d = 0
	e = 0
	(a1, b1) = input().split()
	(a2, b2) = input().split()
	if int(a1) == int(a2) and int(a1) == int(b1) + int(b2):
		print('YES')
	elif int(a1) == int(b2) and int(a2) + int(b1) == int(a1):
		print('YES')
	elif int(a2) == int(b1) and int(a1) + int(b2) == int(a2):
		print('YES')
	elif int(b1) == int(b2) and int(a1) + int(a2) == int(b1):
		print('YES')
	else:
		print('NO')


import sys
sys.setrecursionlimit(10 ** 6)

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def SI():
	return sys.stdin.readline()[:-1]

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def LLI1(rows_number):
	return [LI1() for _ in range(rows_number)]
int1 = lambda x: int(x) - 1

def MI1():
	return map(int1, sys.stdin.readline().split())

def LI1():
	return list(map(int1, sys.stdin.readline().split()))
p2D = lambda x: print(*x, sep='\n')
dij = [(1, 0), (0, 1), (-1, 0), (0, -1)]

def main():
	for _ in range(II()):
		(a, b) = MI()
		(x, y) = MI()
		if max(a, b) == max(x, y) and min(a, b) + min(x, y) == max(a, b):
			print('Yes')
		else:
			print('No')
main()


import math
for _ in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	M1 = max(a1, b1)
	m1 = min(a1, b1)
	M2 = max(a2, b2)
	m2 = min(a2, b2)
	j = a1 * b1 + a2 * b2
	k = math.sqrt(j)
	if k * k == j and M1 == M2 and (m1 + m2 == M1):
		print('YES')
	else:
		print('NO')


def read_int():
	n = int(input())
	return n

def read_ints():
	ints = [int(x) for x in input().split(' ')]
	return ints

def solve(a1, b1, a2, b2):
	if a1 == a2:
		if b1 + b2 == a1:
			return 'Yes'
	if a1 == b2:
		if b1 + a2 == a1:
			return 'Yes'
	if b1 == a2:
		if a1 + b2 == b1:
			return 'Yes'
	if b1 == b2:
		if a1 + a2 == b1:
			return 'Yes'
	return 'No'
t = read_int()
for case in range(t):
	(a1, b1) = read_ints()
	(a2, b2) = read_ints()
	sol = solve(a1, b1, a2, b2)
	print(sol)


t = int(input())
for _ in range(t):
	x = list(map(int, input().split()))
	y = list(map(int, input().split()))
	x = sorted(x)
	y = sorted(y)
	if x[0] + y[0] == x[1] and x[1] == y[1]:
		print('YES')
	else:
		print('NO')


import math

def get_num():
	return list(map(int, input().rstrip().split()))

def rotate(my_list, num):
	return my_list[num:] + my_list[:num]

def divisor(num):
	i = 2
	while i <= num:
		if num % i == 0:
			return i
		i += 1

def main():
	for _ in [0] * int(input()):
		(a, b) = sorted(map(int, input().split()))
		(c, d) = sorted(map(int, input().split()))
		print('YNEOS'[b != d or a + c != b::2])
main()


def wasSquare(a1, b1, a2, b2):
	ans = 'NO'
	if a1 == a2 and b1 + b2 == a1:
		ans = 'YES'
	elif a1 == b2 and a2 + b1 == a1:
		ans = 'YES'
	elif b1 == a2 and a1 + b2 == a2:
		ans = 'YES'
	elif b1 == b2 and a1 + a2 == b1:
		ans = 'YES'
	return ans
t = int(input())
for _ in range(t):
	(a1, b1) = list(map(int, input().split()))
	(a2, b2) = list(map(int, input().split()))
	print(wasSquare(a1, b1, a2, b2))


import random
import math
LI = lambda : list(map(int, input().split()))
MI = lambda : map(int, input().split())
yes = lambda : print('Yes')
no = lambda : print('No')
I = lambda : list(input())
J = lambda x: ''.join(x)
II = lambda : int(input())
SI = lambda : input()
t = II()
for q in range(t):
	(a, b) = MI()
	(x, y) = MI()
	if max(a, b) == max(x, y) == min(a, b) + min(x, y):
		yes()
	else:
		no()


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	(a1, b1) = map(int, input().split())
	if max(a, b) == max(a1, b1) and min(a, b) + min(a1, b1) == max(a, b):
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(x1, y1) = map(int, input().split())
	(x2, y2) = map(int, input().split())
	if y1 < x1:
		(x1, y1) = (y1, x1)
	if y2 < x2:
		(x2, y2) = (y2, x2)
	if x1 + x2 == y1 and y1 == y2:
		print('Yes')
	else:
		print('No')


n = int(input())
list1 = []
for test_case in range(n):
	(a1, b1) = list(map(int, input().split()))
	(a2, b2) = list(map(int, input().split()))
	if a1 == a2 and a1 > b1:
		length = b1 + b2
		if length == a1:
			list1.append('Yes')
		else:
			list1.append('No')
	elif a1 == b2 and a1 > b1:
		length = a2 + b1
		if length == a1:
			list1.append('Yes')
		else:
			list1.append('No')
	elif b1 == a2 and b1 > a1:
		length = a1 + b2
		if length == a2:
			list1.append('Yes')
		else:
			list1.append('No')
	elif b1 == b2 and b1 > a1:
		length = a1 + a2
		if length == b1:
			list1.append('Yes')
		else:
			list1.append('No')
	else:
		list1.append('No')
for items in list1:
	print(items)


import math
t = int(input())
for i in range(0, t):
	(a, b) = input().split()
	(a, b) = (int(a), int(b))
	(c, d) = input().split()
	(c, d) = (int(c), int(d))
	flag = 0
	if a == c and a == b + d:
		flag = 1
	if a == d and a == b + c:
		flag = 1
	if b == d and b == a + c:
		flag = 1
	if b == c and b == a + d:
		flag = 1
	if flag == 1:
		print('YES')
	else:
		print('NO')


test_cases = int(input())
for i in range(test_cases):
	first_line = input()
	a1 = int(first_line.split(' ')[0])
	b1 = int(first_line.split(' ')[1])
	second_line = input()
	a2 = int(second_line.split(' ')[0])
	b2 = int(second_line.split(' ')[1])
	if min(a1, b1) + min(a2, b2) == max(a1, b1) == max(a2, b2):
		print('YES')
	else:
		print('NO')


testcases = int(input())
for i in range(testcases):
	rec1 = [int(i) for i in input().split()]
	rec2 = [int(i) for i in input().split()]
	if rec1[0] == rec2[0] and rec1[0] == rec1[1] + rec2[1]:
		print('Yes')
	elif rec1[0] == rec2[1] and rec1[0] == rec1[1] + rec2[0]:
		print('Yes')
	elif rec1[1] == rec2[0] and rec1[1] == rec1[0] + rec2[1]:
		print('Yes')
	elif rec1[1] == rec2[1] and rec1[1] == rec1[0] + rec2[0]:
		print('Yes')
	else:
		print('No')


T = int(input())
for _ in range(T):
	(A, B) = map(int, input().split())
	(C, D) = map(int, input().split())
	(A, B) = (max(A, B), min(A, B))
	(C, D) = (max(C, D), min(C, D))
	if A == C and B + D == A:
		print('Yes')
	else:
		print('No')


import math
testCaseNumber = int(input())
testCase = []
for i in range(testCaseNumber):
	(a, b) = map(int, input().strip().split())
	(c, d) = map(int, input().strip().split())
	if a < b:
		(a, b) = (b, a)
	if c < d:
		(c, d) = (d, c)
	if a == c and b + d == a:
		testCase.append('Yes')
	else:
		testCase.append('No')
for i in testCase:
	print(i)


def f(l):
	return max(l[0]) == max(l[1]) and min(l[0]) + min(l[1]) == max(l[0])
t = int(input())
for _ in range(t):
	l = [list(map(int, input().split())) for _ in range(2)]
	print('Yes' if f(l) else 'No')


t = int(input())
for _ in range(t):
	n = [int(i) for i in input().split()]
	m = [int(i) for i in input().split()]
	ans = False
	if n[0] == m[0] and n[1] + m[1] == n[0]:
		ans = True
	elif n[0] == m[1] and n[1] + m[0] == n[0]:
		ans = True
	elif n[1] == m[0] and n[0] + m[1] == n[1]:
		ans = True
	elif n[1] == m[1] and n[0] + m[0] == n[1]:
		ans = True
	if ans:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(0, t):
	li = []
	(x, y) = map(int, input().split())
	(a, b) = map(int, input().split())
	count = 0
	if x == a:
		if x == y + b:
			print('Yes')
			count = 1
	if x == b:
		if x == y + a:
			print('Yes')
			count = 1
	if y == a:
		if y == x + b:
			print('Yes')
			count = 1
	if y == b:
		if y == x + a:
			print('Yes')
			count = 1
	if count == 0:
		print('No')


t = int(input())
for k in range(t):
	(a1, a2) = list(map(int, input().split(' ')))
	a = min(a1, a2)
	b = max(a1, a2)
	(c1, c2) = list(map(int, input().split(' ')))
	c = min(c1, c2)
	d = max(c1, c2)
	if a == c and b + d == a:
		print('YES')
	elif b == d and a + c == b:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	x1 = min(a1, b1) + min(a2, b2)
	if max(a1, b1) == max(a2, b2):
		if x1 == max(a1, b1):
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


import sys
import heapq as hq
readline = sys.stdin.readline
ns = lambda : readline().rstrip()
ni = lambda : int(readline().rstrip())
nm = lambda : map(int, readline().split())
nl = lambda : list(map(int, readline().split()))

def solve():
	(a, b) = nm()
	(c, d) = nm()
	if a > b:
		(a, b) = (b, a)
	if c > d:
		(c, d) = (d, c)
	print('YES' if a + c == b == d else 'NO')
T = ni()
for _ in range(T):
	solve()


n = int(input())
import math

def is_square(integer):
	root = math.sqrt(integer)
	return integer == int(root + 0.5) ** 2
for i in range(n):
	(p, q) = list(map(int, input().split()))
	(r, s) = list(map(int, input().split()))
	ans = 0
	if p == r and p == q + s:
		ans = 1
	elif p == s and p == q + r:
		ans = 1
	elif q == r and q == p + s:
		ans = 1
	elif q == s and q == p + r:
		ans = 1
	if ans == 0:
		print('NO')
	else:
		print('YES')


for T in range(int(input())):
	x = input().split()
	y = input().split()
	for i in range(2):
		x[i] = int(x[i])
	for i in range(2):
		y[i] = int(y[i])
	if x[0] < x[1]:
		c = int(x[0])
		x[0] = x[1]
		x[1] = c
	if y[0] < y[1]:
		c = int(y[0])
		y[0] = y[1]
		y[1] = int(c)
	if x[0] == y[0] and int(x[1]) + int(y[1]) == int(x[0]):
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	l1 = input().split()
	l2 = input().split()
	if l1[0] == l2[0] and int(l1[1]) + int(l2[1]) == int(l1[0]):
		print('Yes')
		continue
	if l1[0] == l2[1] and int(l1[1]) + int(l2[0]) == int(l1[0]):
		print('Yes')
		continue
	if l1[1] == l2[0] and int(l1[0]) + int(l2[1]) == int(l1[1]):
		print('Yes')
		continue
	if l1[1] == l2[1] and int(l1[0]) + int(l2[0]) == int(l1[1]):
		print('Yes')
		continue
	print('No')


import sys, bisect, string, math, time, functools, random
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
from itertools import permutations, combinations, groupby

def Golf():
	(*a,) = map(int, open(0))

def I():
	return int(input())

def S_():
	return input()

def IS():
	return input().split()

def LS():
	return [i for i in input().split()]

def LI():
	return [int(i) for i in input().split()]

def LI_():
	return [int(i) - 1 for i in input().split()]

def NI(n):
	return [int(input()) for i in range(n)]

def NI_(n):
	return [int(input()) - 1 for i in range(n)]

def StoLI():
	return [ord(i) - 97 for i in input()]

def ItoS(n):
	return chr(n + 97)

def LtoS(ls):
	return ''.join([chr(i + 97) for i in ls])

def GI(V, E, ls=None, Directed=False, index=1):
	org_inp = []
	g = [[] for i in range(V)]
	FromStdin = True if ls == None else False
	for i in range(E):
		if FromStdin:
			inp = LI()
			org_inp.append(inp)
		else:
			inp = ls[i]
		if len(inp) == 2:
			(a, b) = inp
			c = 1
		else:
			(a, b, c) = inp
		if index == 1:
			a -= 1
			b -= 1
		aa = (a, c)
		bb = (b, c)
		g[a].append(bb)
		if not Directed:
			g[b].append(aa)
	return (g, org_inp)

def GGI(h, w, search=None, replacement_of_found='.', mp_def={'#': 1, '.': 0}, boundary=1):
	mp = [boundary] * (w + 2)
	found = {}
	for i in range(h):
		s = input()
		for char in search:
			if char in s:
				found[char] = (i + 1) * (w + 2) + s.index(char) + 1
				mp_def[char] = mp_def[replacement_of_found]
		mp += [boundary] + [mp_def[j] for j in s] + [boundary]
	mp += [boundary] * (w + 2)
	return (h + 2, w + 2, mp, found)

def TI(n):
	return GI(n, n - 1)

def bit_combination(k, n=2):
	rt = []
	for tb in range(n ** k):
		s = [tb // n ** bt % n for bt in range(k)]
		rt += [s]
	return rt

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
YN = ['YES', 'NO']
Yn = ['Yes', 'No']
mo = 10 ** 9 + 7
inf = float('inf')
l_alp = string.ascii_lowercase
input = lambda : sys.stdin.readline().rstrip()

class Tree:

	def __init__(self, inp_size=None, init=True):
		self.LCA_init_stat = False
		self.ETtable = []
		if init:
			self.stdin(inp_size)
		return

	def stdin(self, inp_size=None, index=1):
		if inp_size == None:
			self.size = int(input())
		else:
			self.size = inp_size
		(self.edges, _) = GI(self.size, self.size - 1, index=index)
		return

	def listin(self, ls, index=0):
		self.size = len(ls) + 1
		(self.edges, _) = GI(self.size, self.size - 1, ls, index=index)
		return

	def __str__(self):
		return str(self.edges)

	def dfs(self, x, func=lambda prv, nx, dist: prv + dist, root_v=0):
		q = deque()
		q.append(x)
		v = [-1] * self.size
		v[x] = root_v
		while q:
			c = q.pop()
			for (nb, d) in self.edges[c]:
				if v[nb] == -1:
					q.append(nb)
					v[nb] = func(v[c], nb, d)
		return v

	def EulerTour(self, x):
		q = deque()
		q.append(x)
		self.depth = [None] * self.size
		self.depth[x] = 0
		self.ETtable = []
		self.ETdepth = []
		self.ETin = [-1] * self.size
		self.ETout = [-1] * self.size
		cnt = 0
		while q:
			c = q.pop()
			if c < 0:
				ce = ~c
			else:
				ce = c
				for (nb, d) in self.edges[ce]:
					if self.depth[nb] == None:
						q.append(~ce)
						q.append(nb)
						self.depth[nb] = self.depth[ce] + 1
			self.ETtable.append(ce)
			self.ETdepth.append(self.depth[ce])
			if self.ETin[ce] == -1:
				self.ETin[ce] = cnt
			else:
				self.ETout[ce] = cnt
			cnt += 1
		return

	def LCA_init(self, root):
		self.EulerTour(root)
		self.st = SparseTable(self.ETdepth, init_func=min, init_idl=inf)
		self.LCA_init_stat = True
		return

	def LCA(self, root, x, y):
		if self.LCA_init_stat == False:
			self.LCA_init(root)
		(xin, xout) = (self.ETin[x], self.ETout[x])
		(yin, yout) = (self.ETin[y], self.ETout[y])
		a = min(xin, yin)
		b = max(xout, yout, xin, yin)
		id_of_min_dep_in_et = self.st.query_id(a, b + 1)
		return self.ETtable[id_of_min_dep_in_et]

class SparseTable:

	def __init__(self, ls, init_func=min, init_idl=float('inf')):
		self.func = init_func
		self.idl = init_idl
		self.size = len(ls)
		self.N0 = self.size.bit_length()
		self.table = [ls[:]]
		self.index = [list(range(self.size))]
		self.lg = [0] * (self.size + 1)
		for i in range(2, self.size + 1):
			self.lg[i] = self.lg[i >> 1] + 1
		for i in range(self.N0):
			tmp = [self.func(self.table[i][j], self.table[i][min(j + (1 << i), self.size - 1)]) for j in range(self.size)]
			tmp_id = [self.index[i][j] if self.table[i][j] == self.func(self.table[i][j], self.table[i][min(j + (1 << i), self.size - 1)]) else self.index[i][min(j + (1 << i), self.size - 1)] for j in range(self.size)]
			self.table += [tmp]
			self.index += [tmp_id]

	def query(self, l, r):
		N = self.lg[r - l]
		return self.func(self.table[N][l], self.table[N][r - (1 << N)])

	def query_id(self, l, r):
		N = self.lg[r - l]
		(a, b) = (self.index[N][l], self.index[N][r - (1 << N)])
		if self.table[0][a] == self.func(self.table[N][l], self.table[N][r - (1 << N)]):
			b = a
		return b

	def __str__(self):
		return str(self.table[0])

	def print(self):
		for i in self.table:
			print(*i)
show_flg = False
show_flg = True
ans = 0
T = I()
for _ in range(T):
	(a, b) = LI()
	(c, d) = LI()
	if a > b:
		(a, b) = (b, a)
	if c > d:
		(c, d) = (d, c)
	ans = 'Yes' if b == d and a + c == b else 'No'
	print(ans)


n = int(input())
l = []
k = []
for i in range(2 * n):
	(a, b) = list(map(int, input().split()))
	if i % 2 == 0:
		(c, d) = (max(a, b), min(a, b))
	if i % 2 == 1:
		(e, f) = (max(a, b), min(a, b))
		if c == e and d + f == c:
			print('Yes')
		else:
			print('No')
		l = []


t = int(input())
for i in range(t):
	rect1 = list(map(int, input().split()))
	rect2 = list(map(int, input().split()))
	rect1.sort(reverse=True)
	rect2.sort(reverse=True)
	if rect1[0] == rect2[0] and rect1[1] + rect2[1] == rect1[0]:
		print('YES', '\n')
	else:
		print('NO', '\n')


t = int(input())
for i in range(t):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if max(a1, b1) != max(a2, b2):
		print('NO')
	elif min(a1, b1) + min(a2, b2) == max(a1, b1):
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	l = []
	l1 = []
	a = input().split()
	b = input().split()
	l.append(int(a[0]))
	l.append(int(a[1]))
	l1.append(int(b[0]))
	l1.append(int(b[1]))
	if l[0] + l1[0] == l[1] == l1[1] or l[1] + l1[0] == l[0] == l1[1] or l[0] + l1[1] == l[1] == l1[0] or (l[1] + l1[1] == l[0] == l1[0]):
		print('YES')
	else:
		print('NO')


n = int(input())
lst = []
i = 1
for test in range(n):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	if b1 == b2 and a1 + a2 == b1 or (a1 == b2 and b1 + a2 == a1) or (a1 == a2 and b1 + b2 == a1) or (a2 == b1 and b2 + a1 == a2):
		print('yes')
	else:
		print('no')


t = int(input())

def check(m, n, x, y):
	min1 = min(m, n)
	min2 = min(x, y)
	if max(m, n) != max(x, y):
		return 'NO'
	elif min1 + min2 == max(x, y):
		return 'YES'
	else:
		return 'NO'
for _ in range(t):
	(m, n) = map(int, input().split())
	(x, y) = map(int, input().split())
	print(check(m, n, x, y))


def is_square(a, b, c, d):
	if a + c == b and b == d or (a + d == b and b == c) or (b + c == a and a == d) or (b + d == a and a == c):
		return 'Yes'
	return 'No'
t = int(input())
for i in range(t):
	(a, b) = list(map(int, input().split()))
	(c, d) = list(map(int, input().split()))
	print(is_square(a, b, c, d))


for _ in range(int(input())):
	(arr1, arr2) = ([], [])
	(a, b) = map(int, input().split())
	(n, m) = map(int, input().split())
	arr1.append(a)
	arr1.append(b)
	arr2.append(n)
	arr2.append(m)
	arr1.sort()
	arr2.sort()
	if arr1[1] == arr2[1] and arr1[0] + arr2[0] == arr1[1]:
		print('Yes')
	else:
		print('No')


t = int(input())
ans = list()
a = list()
b = list()
supra_ans = []
for i in range(0, t):
	a = a + [int(a) for a in input().split()]
	b = b + [int(b) for b in input().split()]
	if a[0] == b[0]:
		if a[1] + b[1] == a[0]:
			ans = ans + ['Yes']
		else:
			ans = ans + ['No']
	if a[1] == b[0]:
		if a[0] + b[1] == a[1]:
			ans = ans + ['Yes']
		else:
			ans = ans + ['No']
	if a[0] == b[1]:
		if a[1] + b[0] == a[0]:
			ans = ans + ['Yes']
		else:
			ans = ans + ['No']
	if a[1] == b[1]:
		if a[0] + b[0] == b[1]:
			ans = ans + ['Yes']
		else:
			ans = ans + ['No']
	ans = ans + ['No']
	if len(ans) == 1:
		supra_ans = supra_ans + ans
	elif 'Yes' in ans:
		supra_ans = supra_ans + ['Yes']
	else:
		supra_ans = supra_ans + ['No']
	del a[0:]
	del b[0:]
	del ans[0:]
for i in supra_ans:
	print(i)


N = int(input())
for _ in range(N):
	(x, y) = map(int, input().split())
	(x1, y1) = map(int, input().split())
	if max(x, y) == max(x1, y1):
		if min(x, y) + min(x1, y1) == max(x, y):
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for q in range(t):
	o = list(map(int, input().split()))
	t = list(map(int, input().split()))
	o.sort()
	t.sort()
	if o[0] + t[0] == o[1] and o[1] == t[1]:
		print('Yes')
	else:
		print('No')


import os
import sys
from io import BytesIO, IOBase

def solution():
	pass

def main():
	for _ in range(r_int()):
		(a1, b1) = sorted(r_array())
		(a2, b2) = sorted(r_array())
		if a1 == b1 or a2 == b2:
			write('NO')
		elif b1 != b2:
			write('NO')
		elif b1 == b2:
			if a1 + a2 == b1:
				write('YES')
			else:
				write('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def write(*args, end='\n'):
	for x in args[:-1]:
		sys.stdout.write(str(x) + ' ')
	sys.stdout.write(str(args[-1]))
	sys.stdout.write(end)

def r_array():
	return [int(x) for x in input().split()]

def r_int():
	return int(input())
main()


t = int(input())

def found(a, b, item):
	for i in range(len(a)):
		for j in range(len(b)):
			if a[i] == b[j] and b[j] == item:
				return True
for i in range(t):
	a = list(map(int, input().split()))
	b = list(map(int, input().split()))
	n = max(a)
	summa = 0
	if found(a, b, n):
		a = a + b
		for i in a:
			if i != n:
				summa += i
		if summa == n:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


import math
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	l1 = []
	l2 = []
	l1.append(a)
	l1.append(b)
	l2.append(c)
	l2.append(d)
	l1.sort()
	l2.sort()
	if l1[1] == l2[1]:
		if l1[0] + l2[0] == l1[1]:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for t in range(int(input())):
	(a1, b1) = [int(x) for x in input().split()]
	(a2, b2) = [int(y) for y in input().split()]
	len1 = max(a1, b1)
	wid1 = min(a1, b1)
	len2 = max(a2, b2)
	wid2 = min(a2, b2)
	if len1 == len2:
		if len1 == wid1 + wid2:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	l1 = max(a, b)
	l2 = max(c, d)
	if l1 != l2:
		print('NO')
	elif min(a, b) + min(c, d) == l1:
		print('YES')
	else:
		print('NO')


for t in range(int(input())):
	l1 = sorted(list(map(int, input().split())))
	l2 = sorted(list(map(int, input().split())))
	if l1[1] == l2[1] and l1[0] + l2[0] == l1[1]:
		print('Yes')
	else:
		print('No')


import os
import sys
from math import *
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return map(int, input().split())

def array():
	return [int(i) for i in input().split()]
for _ in range(int(input())):
	(a, b) = value()
	(c, d) = value()
	if a == c and b + d == a:
		print('YES')
	elif a == d and b + c == a:
		print('YES')
	elif b == c and a + d == b:
		print('YES')
	elif b == d and a + c == b:
		print('YES')
	else:
		print('NO')


t = int(input())
x = 0
for _ in range(t):
	(a1, b1) = sorted(map(int, input().split()))
	(a2, b2) = sorted(map(int, input().split()))
	if b1 != b2 or a1 + a2 != b1:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	x = list(map(int, input().split()))
	y = list(map(int, input().split()))
	if x[0] < x[1]:
		a_x = x[1]
		a = 1
	else:
		a_x = x[0]
		a = 0
	if y[0] < y[1]:
		b_y = y[1]
		b = 1
	else:
		b_y = y[0]
		b = 0
	if a_x == b_y and x[a - 1] + y[b - 1] == a_x:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	numbers_1 = [int(i.strip()) for i in input().split(' ')]
	numbers_2 = [int(i.strip()) for i in input().split(' ')]
	check_1 = False
	for (index_1, i) in enumerate(numbers_1):
		for (index_2, j) in enumerate(numbers_2):
			if i == j:
				num = numbers_1[len(numbers_1) - (index_1 + 1)] + numbers_2[len(numbers_2) - (index_2 + 1)]
				if i == num:
					print('Yes')
					check_1 = True
	if not check_1:
		print('No')


n = int(input())
i = 0
while i < n:
	(a, b) = input().split()
	(c, d) = input().split()
	a = int(a)
	b = int(b)
	c = int(c)
	d = int(d)
	if a > b:
		(a, b) = (b, a)
	if c > d:
		(c, d) = (d, c)
	if b == d == a + c:
		print('Yes')
	else:
		print('No')
	i = i + 1


t = int(input())
for _ in range(t):
	(a1, b1) = list((int(x) for x in input().split()))
	(a2, b2) = list((int(x) for x in input().split()))
	if a1 < b1:
		(a1, b1) = (b1, a1)
	if a2 < b2:
		(a2, b2) = (b2, a2)
	if a1 == a2:
		s = b1 + b2
		if s == a1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


n = int(input())
for i in range(n):
	(a, b) = input().split(' ')
	a = int(a)
	b = int(b)
	(c, d) = input().split(' ')
	c = int(c)
	d = int(d)
	if a == b or c == d:
		print('NO')
		continue
	maxa = max(a, b)
	mina = min(a, b)
	maxc = max(c, d)
	minc = min(c, d)
	if maxa == mina + minc and maxc == maxa:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	if math.sqrt(a * b + c * d) % 1 == 0:
		x = math.sqrt(a * b + c * d)
		if (a == x or b == x) and (c == x or d == x):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


n = int(input())
res = []
for i in range(n):
	x = list(map(int, input().split()))
	y = list(map(int, input().split()))
	x = sorted(x)
	y = sorted(y)
	if x[0] + y[0] == x[1] and x[1] == y[1]:
		res.append('Yes')
	else:
		res.append('No')
for i in res:
	print(i)


def is_square():
	rect_1 = list(map(int, input().split()))
	rect_2 = list(map(int, input().split()))
	if max(rect_1) == max(rect_2):
		if min(rect_1) + min(rect_2) == max(rect_1):
			print('Yes')
		else:
			print('No')
	else:
		print('No')

def main():
	for cases in range(int(input())):
		is_square()
main()


from math import sqrt
n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	k = sqrt(c * d + a * b)
	if k == int(k):
		if max(c, d) == max(a, b):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	k = list(map(int, input().split()))
	l.sort()
	k.sort()
	if k[1] != l[1]:
		print('NO')
	elif k[0] + l[0] == l[1]:
		print('YES')
	else:
		print('NO')


for t in range(int(input())):
	(d1, d2) = map(int, input().split())
	(d3, d4) = map(int, input().split())
	if d1 == d4 and d2 + d3 == d1 or (d2 == d3 and d1 + d4 == d2) or (d1 == d3 and d2 + d4 == d1) or (d2 == d4 and d1 + d3 == d2):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	d1 = list(map(int, input().split()))
	d2 = list(map(int, input().split()))
	d1.sort()
	d2.sort()
	if d1[1] == d2[1] and d1[0] + d2[0] == d1[1]:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(a1, b1) = list(map(int, input().split()))
	(a2, b2) = list(map(int, input().split()))
	mx1 = max(a1, b1)
	mx2 = max(a2, b2)
	mn1 = min(a1, b1)
	mn2 = min(a2, b2)
	if mx1 == mx2 and mn1 + mn2 == mx1:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(0, t):
	(a, b) = map(int, input().split())
	(c, d) = map(int, input().split())
	lado = max([a, b])
	lado1 = max([c, d])
	x = min([a, b])
	y = min([d, c])
	if lado == lado1:
		if x + y == lado:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for i in range(int(input())):
	sq = False
	(a, b) = map(int, input().split(' '))
	(c, d) = map(int, input().split(' '))
	if a + d == b and b == c:
		print('Yes')
	elif b + c == a and a == d:
		print('Yes')
	elif b + d == a and a == c:
		print('Yes')
	elif a + c == b and b == d:
		print('Yes')
	else:
		print('No')


t = input()
list_1 = []
for i in range(int(t)):
	(l1, w1) = input().split(' ')
	(l2, w2) = input().split(' ')
	tuple_1 = (int(l1), int(w1))
	tuple_2 = (int(l2), int(w2))
	sum_1 = max(tuple_1)
	sum_2 = max(tuple_2)
	min_1 = min(tuple_1)
	min_2 = min(tuple_2)
	if int(sum_1) == int(sum_2):
		if int(min_1) + int(min_2) == int(sum_1):
			list_1.append('YES')
		else:
			list_1.append('NO')
	else:
		list_1.append('NO')
print('\n'.join(list_1))


for i in range(int(input())):
	x = list(map(int, input().split()[:2]))
	y = list(map(int, input().split()[:2]))
	x.sort()
	y.sort()
	if x[0] + y[0] == x[1] and x[0] + y[0] == y[1]:
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout
import math
import heapq
t = 1

def aint():
	return int(input().strip())

def lint():
	return list(map(int, input().split()))

def fint():
	return list(map(int, stdin.readline().split()))

def main():
	(x1, y1) = lint()
	(x2, y2) = lint()
	if x1 == x2 and x1 == y1 + y2:
		print('Yes')
	elif y1 == y2 and x1 + x2 == y1:
		print('Yes')
	elif x1 == y2 and x2 + y1 == x1:
		print('Yes')
	elif x2 == y1 and x1 + y2 == y1:
		print('Yes')
	else:
		print('No')
	return
t = int(input())
for i in range(t):
	main()


import os
import sys
from io import BytesIO, IOBase

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()

def test():
	r1 = sorted(map(int, input().split()))
	r2 = sorted(map(int, input().split()))
	return ['No', 'Yes'][r1[0] + r2[0] == r1[1] == r2[1]]
t = int(input())
for _ in range(t):
	print(test())


t = int(input())
import math
for i in range(t):
	a = list(map(int, input().strip().split()))
	b = list(map(int, input().strip().split()))
	a.sort(reverse=True)
	b.sort(reverse=True)
	ans = 'NO'
	k = 0
	x = 0
	for i in range(2):
		for j in range(2):
			if a[i] == b[j]:
				x = a[i]
				del a[i]
				del b[j]
				k = 1
				break
		if k == 1:
			break
	if a[0] + b[0] == x:
		ans = 'YES'
	print(ans)


for q in range(int(input())):
	(a1, b1) = map(int, input().split())
	(a2, b2) = map(int, input().split())
	res = (a1 + a2 == b1) & (b1 == b2)
	res += (a1 + b2 == a2) & (b1 == a2)
	res += (b1 + a2 == a1) & (a1 == b2)
	res += (b1 + b2 == a1) & (a1 == a2)
	print('Yes' if res else 'No')