Alice, Bob, and Charlie have X, Y, and Z chocolates respectively.  
Find whether you can redistribute the chocolates such that:
Each person has at least one chocolate;
No two people have same number of chocolates;
No chocolate is left after redistribution.

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

- The first line of input will contain a single integer T, denoting the number of test cases.
- The first and only line of each test case contains three space-separated integers X, Y, and Z — the number of chocolates Alice, Bob, and Charlie have initially.

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

For each test case, output on a new line YES, if you can redistribute all the chocolates such that all the given conditions are met, and 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 ≤ X, Y, Z ≤ 100$

----- Sample Input 1 ------ 
4
1 2 3
1 1 1
2 2 2
2 1 1

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

----- explanation 1 ------ 
Test case $1$: No two people have same number of chocolates and everyone has at least one chocolate. Thus, there is no need of redistribution.

Test case $2$: We cannot redistribute the chocolates such that no two people have same number of chocolates and everyone has at least one chocolate.

Test case $3$: Alice can give $1$ chocolate to Charlie. The number of chocolates they have, would become $1, 2,$ and $3$ respectively. Thus, no two people have same number of chocolates and everyone has at least one chocolate.

Test case $4$: We cannot redistribute the chocolates such that no two people have same number of chocolates and everyone has at least one chocolate.

Difficulty: EASY
Tags: Mathematics

Starter code:

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


for i in range(int(input())):
	x = list(map(int, input().split()))
	b = x[0] + x[1] + x[2]
	n = 0
	if b >= 6:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	lst = list(map(int, input().split()))
	if sum(lst) >= 6:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(X, Y, Z) = map(int, input().split())
	total = X + Y + Z
	if total >= 6:
		print('YES')
	else:
		print('NO')


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


def first(am, bm, cm) -> bool:
	if am + bm + cm >= 6:
		return True
	return False
for _ in range(int(input())):
	(Am, Bm, Cm) = map(int, input().split())
	Tm = Am + Bm + Cm
	if first(Am, Bm, Cm):
		print('YES')
	else:
		print('NO')


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


n = int(input())
for i in range(n):
	m = list(map(int, input().split()))
	(a, b, c) = (m[0], m[1], m[2])
	if a + b + c > 5:
		print('YES')
	else:
		print('NO')


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


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


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


def code():
	cases = int(input())
	for _ in range(cases):
		(X, Y, Z) = map(int, input().split(' '))
		num_chocs = [X, Y, Z]
		if sum(num_chocs) >= 6:
			print('YES')
		else:
			print('NO')
code()


t = int(input())
for i in range(t):
	(X, Y, Z) = map(int, input().split())
	S = X + Y + Z
	if S >= 6:
		print('YES')
	else:
		print('NO')


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


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