Federal Voting Age

No attempts yetTime limit1sMemory limit128 MB

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 $n$ ($1 \le n \le 100$), the number of birthdays to check. Each of the next $n$ lines contains three integers $y\ m\ d$, where $y$ ($0 \le y \le 2007$) is the birth year, $m$ ($1 \le m \le 12$) is the birth month, and $d$ ($1 \le d \le 31$) 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.