CodechefAug 27, 2025

Sleep deprivation

Hazrat Ali

Codechef

Chef was only able to sleep X hours yesterday. Determine if he is sleep deprived or not.

Input Format

  • The first line contains a single integer T — the number of test cases. Then the test cases follow.
  • The first and only line of each test case contains one integer X — the number of hours Chef slept.

Output Format

For each test case, output YES if Chef is sleep-deprived. Otherwise, output NO.

You may print each character of YES and NO in uppercase or lowercase (for example, yesyEsYes will be considered identical).

Constraints

  • 1≤T≤20
  • 1≤X≤15

Sample 1:

Input
3
4
7
10
Output
 
YES
NO
NO

Solution

T = int(input())  

for _ in range(T):
    x = int(input())   
    if x < 7:
        print("YES")
    else:
        print("NO")





Comments