Codechef•Jul 20, 2025
Audible Range
Hazrat Ali
Codechef
If Chef's commands have a frequency of X Hertz, find whether binary can hear them or not.
Input Format
- The first line of input will contain a single integer TT, denoting the number of test cases.
- Each test case consists of a single integer X - the frequency of Chef's commands in Hertz.
Output Format
For each test case, output on a new line YES
, if binary can hear Chef's commands. Otherwise, print NO
.
The output is case-insensitive. Thus, the strings YES
, yes
, yeS
, and Yes
are all considered the same.
Constraints
- 1≤T≤10
- 1≤X≤10
Sample 1:
Input
5 42 67 402 45000 45005
Output
NO YES YES YES NO
Solution
t = int(input())
while t > 0:
n = int(input())
if 67 <= n <= 45000:
print("Yes")
else:
print("No")
t -= 1