Leap years

Write a program that reads a sequence of years and, for each one, prints
if it is a leap year or is not.

A leap year is a year that has 366 days. After the gregorian reform are
leap years the multiples of four that do not end with two zeros, and
also the years ended in two zeros such that the number without the two
final zeros is divisible by four.Thus, 1800, 1900 although being
multiples of four, were not leap years; however, the year 2000 was a
leap year.

Input

Input is a natural number y between 1800 and 9999.

Output

For each year of the input, print “YES” or “NO” in a line indicating if
is a leap year or is not.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T11:11:10.307Z

© Jutge.org, 2006–2026.
https://jutge.org
