Recently, Devendra went to Goa with his friends. Devendra is well known for not following a budget.

He had Rs. Z at the start of the trip and has already spent Rs. Y on the trip. There are three kinds of water sports one can enjoy, with prices Rs. A, B, and C. He wants to try each sport at least once. 

If he can try all of them at least once output YES, otherwise output NO.

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

- The first line of input contains a single integer T, denoting the number of test cases. The description of T test cases follows.
- Each test case consists of a single line of input containing five space-separated integers Z, Y, A, B, C.

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

For each test case, print a single line containing the answer to that test case — YES if Devendra can try each ride at least once, and NO otherwise.

You may print each character of the string in uppercase or lowercase (for example, the strings "yEs", "yes", "Yes" and "YES" will all be treated as identical).

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

$1≤ T≤ 10$
$10^{4} ≤ Z ≤ 10^{5}$
$0 ≤ Y ≤ Z$
$100 ≤ A,B,C ≤ 5000$

----- Sample Input 1 ------ 
3
25000 22000 1000 1500 700
10000 7000 100 300 500
15000 5000 2000 5000 3000
----- Sample Output 1 ------ 
NO
YES
YES
----- explanation 1 ------ 
Test Case 1: After spending Rs. $22000$ on the trip already, Devendra is left with Rs. $3000$. The water sports cost a total of $1000+1500+700 = 3200$. So, he does not have enough money left to try all the watersports.

Test Case 2: After spending Rs. $10000$ on the trip, he is left with Rs. $3000$. The water sports cost a total of $100+300+500 = 900$. So, he has enough money to try all the watersports.

Test Case 3: After spending Rs. $5000$ on the trip, he is left with Rs. $10000$. The water sports cost a total of $2000+5000+3000 = 10000$. So, he still has enough money left to try all the watersports.

Source: codechef | Difficulty: EASY
Tags: Mathematics


Solutions:
t = int(input())
for i in range(t):
	(z, y, a, b, c) = map(int, input().split())
	left = z - y
	if a + b + c <= left:
		print('YES')
	else:
		print('NO')


num_test_cases = int(input())
while num_test_cases > 0:
	(z_val, y_val, cost_a, cost_b, cost_c) = map(int, input().split())
	amm_val = z_val - y_val
	total_cost = cost_a + cost_b + cost_c
	if total_cost <= amm_val:
		print('YES')
	else:
		print('NO')
	num_test_cases -= 1


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


t = int(input())
for i in range(t):
	(a, b, c, d, e) = map(int, input().split())
	k = a - b
	p = c + d + e
	if k >= p:
		print('YES')
	else:
		print('NO')


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


t = int(input())
for i in range(t):
	(m, n, o, p, q) = map(int, input().split())
	a = m - (n + o + p + q)
	if a >= 0:
		print('YES')
	else:
		print('NO')


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


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


n = int(input())
for i in range(n):
	(a, b, c, d, e) = list(map(int, input().split()))
	m = abs(a - b)
	if m >= c + d + e:
		print('YES')
	else:
		print('NO')


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


d = int(input())
for i in range(d):
	(w, r, a, b, c) = map(int, input().split())
	diff = w - r
	sum = a + b + c
	if diff >= sum:
		print('YES')
	else:
		print('NO')


T = int(input())
for _ in range(T):
	(Z, Y, A, B, C) = map(int, input().split())
	balance_money = Z - Y
	money_required = A + B + C
	if balance_money >= money_required:
		print('YES')
	else:
		print('NO')


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


T = int(input())
for i in range(T):
	(Z, Y, A, B, C) = map(int, input().split())
	moneySpent = Z - Y
	moneyForSports = A + B + C
	if moneyForSports > moneySpent:
		print('NO')
	else:
		print('YES')


def code():
	cases = int(input())
	for _ in range(cases):
		(Z, Y, A, B, C) = map(int, input().split(' '))
		money_left = Z - Y
		money_needed = A + B + C
		if money_left >= money_needed:
			print('YES')
		else:
			print('NO')
code()


n = int(input())
for i in range(n):
	(z, y, a, b, c) = map(int, input().split())
	re = z - y
	if re >= a + b + c:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	(z, y, a, b, c) = map(int, input().split())
	rem = z - y
	spo = a + b + c
	if rem >= spo:
		print('YES')
	else:
		print('NO')


for j in range(int(input())):
	(Z, Y, A, B, C) = map(int, input().split())
	r = Z - Y
	if r >= A + B + C:
		print('YES')
	else:
		print('NO')