Leap Year
Is year Y a leap year in the Gregorian calendar? A year is a leap year if it is divisible by 4, except century years, which must be divisible by 400.
Input: one integer Y.
Output: YES or NO.
Constraints:
- 1 ≤ Y ≤ 109
Sample Tests
Input 1
2024
Output 1
YES
Input 2
1900
Output 2
NO
Discussion (opens after you solve — no spoilers before)
No comments yet.