Federal Voting Age
Time limit1sMemory limit128 MB
For each birth date, decide whether the person is at least 18 years old on February 27, 2007.
- Level
Easy2 of 10
- Topics
- Implementation, Math
- Solved
- No attempts yet
Problem
An important election will be held on February 27, 2007, and the government has commissioned an electronic voting system. You have been hired as a sub-subcontractor on this very grand programming project.
Your task is to write the part of the system that decides whether a given person is old enough to vote. The voting age is 18, so given a person's date of birth, determine whether that person is at least 18 years old on election day, February 27, 2007.
Input
The first line contains an integer (), the number of birthdays to check. Each of the next lines contains three integers , where () is the birth year, () is the birth month, and () is the birth day. Every given date is guaranteed to be a valid calendar date.
Output
For each date, print Yes on its own line if that person is eligible to vote, or No otherwise.