Algorithm

problem Link : https://github.com/ShazidMashrafi/Codechef-Solutions

Problem

A person is said to be sleep deprived if he slept strictly less than 7 hours in a day.

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

Input Format

• The first line contains a single integer  — the number of test cases. Then the test cases follow.
• The first and only line of each test case contains one integer  — 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).

• 1≤�≤20
• 1≤�≤15

Sample 1:

Input

Output

3
4
7
10

YES
NO
NO


Explanation:

Test Case 1: Since 4<7, Chef is sleep deprived.

Test Case 2: Since 7≥7, Chef is not sleep deprived.

Test Case 3: Since 10≥7, Chef is not sleep deprived.

Code Examples

#1 Code Example with C Programming

Code - C Programming

#include<stdio.h>
int main()
{
int t,x;
scanf("%d",&t);
while(t--)
{
scanf("%d",&x);
if(x>=7) printf("NO\n");
else printf("Yes\n");
}
}.
Copy The Code &

Input

cmd
3 4 7 10

Output

cmd
YES NO NO