Chef is not feeling well today. He measured his body temperature using a thermometer and it came out to be 𝑋X °F.
A person is said to have fever if his body temperature is strictly greater than 9898 °F.
Determine if Chef has fever 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 body temperature of Chef in °F.
Output Format
For each test case, output YES
if Chef has fever. Otherwise, output NO
.
You may print each character of YES
and NO
in uppercase or lowercase (for example, yes
, yEs
, Yes
will be considered identical).
Constraints
- 1≤𝑇≤101≤T≤10
- 94≤𝑋≤10394≤X≤103
Sample 1
Inputcopy | Outputcopy |
---|---|
3 98 100 96 | NO YES NO |
Test Case 1: Since 𝑋=98X=98 is not greater than 9898, Chef does not have fever.
Test Case 2: Since 𝑋=100X=100 is greater than 9898, Chef has fever.
Test Case 3: Since 𝑋=96X=96 is not greater than 9898, Chef does not have fever.
Solutions:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int T = scanner.nextInt();
for (int i = 0; i < T; i++) {
int X = scanner.nextInt();
if (X > 98) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
scanner.close();
}
}