All tasks
Easymathconditions

Leap Year

Time limit 2 s · Memory 64 MBAcceptance: —Solved by: 0

Statement

You are given a year. Print YES if it is a leap year, otherwise NO. A year is a leap year if it is divisible by 4 but not by 100, except that years divisible by 400 are leap years.

Examples

Example 1
Input
2000
Output
YES
Example 2
Input
1900
Output
NO

Constraints

  • 1 ≤ year ≤ 10^9
Solve this task to unlock the editorial.

AI tutor

Stuck? Get a nudge — the tutor explains the idea, it never hands you the solution.