Alice, Bob, and Charlie are contributing to buy a Netflix subscription. However, Netfix allows only two users to share a subscription.

Given that Alice, Bob, and Charlie have A, B, and C rupees respectively and a Netflix subscription costs X rupees, find whether any two of them can contribute to buy a subscription.

------ Input Format ------ 

- The first line of input will contain a single integer T, denoting the number of test cases.
- Each test case contains four space-separated integers A, B, C, and X — the amount that Alice, Bob, and Charlie have, and the cost of a Netflix subscription respectively.

------ Output Format ------ 

For each test case, output YES, if any two of Alice, Bob, and Charlie can contribute to buy a Netflix subscription or NO otherwise.

You may print each character in uppercase or lowercase. For example, NO, no, No, and nO are all considered identical.

------ Constraints ------ 

$1 ≤ T ≤ 1000$
$1 ≤ A, B, C, X ≤ 100$

------ subtasks ------ 

Subtask 1 (10 points): $1 ≤ M ≤ 10$
Subtask 2 (20 points): The sum of $N$ across all test cases won't exceed $20$.
Subtask 3 (70 points): No further constraints.

----- Sample Input 1 ------ 
4
1 1 1 3
2 3 1 5
4 2 3 4
2 1 4 7

----- Sample Output 1 ------ 
NO
YES
YES
NO

----- explanation 1 ------ 
Test case $1$: No two people can contribute to collect enough money to buy a Netflix subscription.

Test case $2$: Alice and Bob can contribute and collect a total of $5$ rupees which is enough to buy a Netflix subscription of $5$ rupees.

Test case $3$: One possible way is, Bob and Charlie can contribute and collect a total of $5$ rupees which is enough to buy a Netflix subscription of $4$ rupees.  
Note that there are other possible ways as well.

Test case $4$: No two people can contribute to collect enough money to buy a Netflix subscription.

Source: codechef | Difficulty: EASY


Solutions:
t = int(input())
for i in range(t):
	(x, y, z, p) = map(int, input().split(' '))
	if x + y >= p or y + z >= p or z + x >= p:
		print('YES')
	else:
		print('NO')


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


for _ in range(int(input())):
	arr = list(map(int, input().split(' ')))
	cost = arr[3]
	arr.pop()
	arr.sort()
	add = arr[1] + arr[2]
	if add >= cost:
		print('YES')
	else:
		print('NO')


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


for i in range(int(input())):
	(A, B, C, X) = map(int, input().split())
	l = [A, B, C, A]
	c = 0
	for j in range(3):
		if l[j] + l[j + 1] >= X:
			c += 1
			print('YES')
			break
	if c == 0:
		print('NO')


t = int(input())
for i in range(1, t + 1):
	(a, b, c, x) = map(int, input().split())
	if a + b >= x or b + c >= x or a + c >= x:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(a, b, c, x) = map(int, input().split())
	x1 = a + b
	x2 = b + c
	x3 = c + a
	if x1 >= x or x2 >= x or x3 >= x:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(A, B, C, X) = map(int, input().split())
	if A + B >= X or B + C >= X or A + C >= X:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	(a, b, c, x) = map(int, input().split())
	l = [a, b, c]
	p = max(l)
	l.remove(p)
	q = max(l)
	if x <= p + q:
		print('YES')
	else:
		print('NO')


a = int(input())
for i in range(a):
	(w, x, y, z) = map(int, input().split())
	if w + x >= z or x + y >= z or y + w >= z:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(x, y, z, c) = map(int, input().split())
	print('YES' if x + y >= c or x + z >= c or y + z >= c else 'NO')


a = int(input())
for i in range(0, a):
	(x, y, z, n) = map(int, input().split())
	myList = [x, y, z]
	myList.sort()
	if myList[2] + myList[1] >= n:
		print('YES')
	else:
		print('NO')


a = int(input())
for i in range(a):
	(p, q, r, s) = map(int, input().split())
	if p + q >= s or p + r >= s or q + r >= s:
		print('YES')
	else:
		print('NO')


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


t = int(input())
while t:
	(a, b, c, x) = map(int, input().split())
	print('YES' if x <= a + b or x <= c + b or x <= a + c else 'NO')
	t -= 1


t = int(input())
for i in range(0, t):
	netflix = list(map(int, input().split()))
	sharayu = netflix[3]
	netflix.remove(netflix[3])
	temp = max(netflix)
	netflix.remove(max(netflix))
	pit = max(netflix)
	if temp + pit >= sharayu:
		print('YES')
	else:
		print('NO')


T = int(input())
while T in range(1, 1001):
	T -= 1
	(A, B, C, X) = input().split()
	A = int(A)
	B = int(B)
	C = int(C)
	X = int(X)
	if A in range(1, 101) and B in range(1, 101) and (C in range(1, 101)) and (X in range(1, 101)):
		if A + B >= X:
			print('YES')
		elif A + C >= X:
			print('YES')
		elif B + C >= X:
			print('YES')
		else:
			print('NO')


N = int(input())
for i in range(N):
	(A, B, C, X) = map(int, input().split())
	if A + B >= X:
		print('YES')
	elif A + C >= X:
		print('YES')
	elif B + C >= X:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	pos = list(map(int, input().split()))
	cmp1 = pos[0] + pos[1]
	cmp2 = pos[1] + pos[2]
	cmp3 = pos[0] + pos[2]
	if cmp1 >= pos[3] or cmp2 >= pos[3] or cmp3 >= pos[3]:
		print('YES')
	else:
		print('NO')


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


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


for i in range(int(input())):
	(n, m, o, x) = map(int, input().split())
	if n + m >= x or n + o >= x or m + o >= x:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	L = list(map(int, input().split()))
	x = L[-1]
	L = L[:-1]
	L.sort()
	Y = L[1:]
	S = sum(Y)
	if S >= x:
		print('YES')
	else:
		print('NO')


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