#K49882. Leap Year Determination

    ID: 28741 Type: Default 1000ms 256MiB

Leap Year Determination

Leap Year Determination

Given a year, determine whether it is a leap year. A leap year is defined by the criterion: a year is a leap year if it is divisible by 400, or if it is divisible by 4 but not divisible by 100. Mathematically, this criterion can be expressed as:

$$\text{isLeapYear}(year)=\begin{cases}\text{Yes},&\text{if } (year\mod 400=0) \quad \text{or} \quad (year\mod 4=0 \ \text{and}\ year\mod 100\neq0)\\[6pt]\text{No},&\text{otherwise}\end{cases}$$

You are given multiple test cases. For each test case, output Yes if the specified year is a leap year and No otherwise.

inputFormat

The first line contains an integer T which denotes the number of test cases. Each of the following T lines contains a single integer representing a year.

outputFormat

For each test case, print a single line containing Yes if the year is a leap year, otherwise print No.## sample

3
2020
1900
2000
Yes

No Yes

</p>