题目描述
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.
输入格式
见题面
输出格式
见题面