#K7291. Leap Year Determination
Leap Year Determination
Leap Year Determination
Given a sequence of years ending with the integer 0, determine for each year (except the terminating 0) whether it is a leap year.
A year is a leap year if and only if \( (year \mod 4 = 0 \wedge year \mod 100 \neq 0) \vee (year \mod 400 = 0) \). Print "Yes" if the year is a leap year, and "No" otherwise.
inputFormat
Input is provided via STDIN. A single line contains a sequence of integers separated by spaces. The sequence is terminated by the integer 0, which should not be processed.
outputFormat
For each year (except the terminating 0), output the result on a new line. Each result will be either "Yes" or "No".## sample
2000 1996 1900 2001 0
Yes
Yes
No
No
</p>