CodechefAug 30, 2025

Lunchtime

Hazrat Ali

Codechef

Given that the current time is X pm, find out whether it is lunchtime for Chef.

Input Format

  • The first line of input will contain a single integer T, the number of test cases. Then the test cases follow.
  • Each test case contains a single line of input, containing one integer X.

Output Format

For each test case, print in a single line YES if it is lunchtime for Chef. Otherwise, print NO.

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

Constraints

  • 1≤T≤12
  • 1≤X≤12

Sample 1:

Input
3
1
7
3
Output 
 
YES
NO
YES

Solution

#include <bits/stdc++.h>
using namespace std;

int main() {

    int t;
    cin >> t;
    while (t--) {
        int a;
        cin >> a;
        if (a >= 1 && a <= 4) {
            cout << "YES\n";
        } else {
            cout << "NO\n";
        }
    }
    return 0;
}



Comments