It is the World Cup Finals. Chef only finds a match interesting if the skill difference of the competing teams is less than or equal to
.
Given that the skills of the teams competing in the final are
andrespectively, determine whether Chef will find the game interesting or not.
Input Format
- The first line of input will contain a single integer
- — the skill levels of the teams and the maximum skill difference.
Output Format
For each testcase, output "YES" if Chef will find the game interesting, else output "NO" (without the quotes). The checker is case-insensitive, so "YeS" and "nO" etc. are also acceptable.
Constraints
Sample Input 1
3
5 3 4
5 3 1
5 5 0
Sample Output 1
YES
NO
YES
Explanation
Test case
: The skill difference between the teams is , which is less than the maximum allowed difference of.
Test case
: The skill difference between the teams is , which is more than the maximum allowed difference of .
No comments:
Post a Comment