CodechefAug 22, 2025

Passes for Fair

Hazrat Ali

Codechef

A person can enter the fair using one pass, and each pass can be used by only one person.

Input Format

  • The first line of input will contain a single integer T, denoting the number of test cases.
  • Each test case consists of a single line containing two space-separated integers N,K

Output Format

For each test case, print on a new line YES if Chef will be able to enter the fair with all his N friends and NO otherwise.

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

Constraints

  • 1≤T≤100
  • 1≤N,K≤100

Sample 1:

Input
4
5 8
6 3
2 2
1 2

Output
 
YES
NO
NO
YES


Solution

for _ in range(int(input())):
    N, K = map(int, input().split())

    if K >= N + 1:
        print("YES")
    else:
        print("NO")

 

Comments