All problems

Problem 765

Leap Year Check

Easy · 10 pts · Math, Basics

Problem

Decide whether a year is a leap year in the Gregorian calendar. A year is a leap year if it is divisible by 4, except that years divisible by 100 are not leap years, unless they are also divisible by 400. So 2024 and 2000 are leap years, while 1900 and 2023 are not. Check the three rules in the right order.

Input

A single integer Y, the year.

Output

Print YES if Y is a leap year, otherwise NO.

Constraints

1 <= Y <= 10^6

Example input

2000

Example output

YES

Explanation

2000 is divisible by 100, which would normally make it a common year, but it is also divisible by 400, so it is a leap year and the answer is YES.

Every problem here can be used in a RelayTrixCode team match. Create a room.

Previous: Middle of Three Numbers Next: Absolute Value