Leap year

Some years have 29 days in February, while others have 28. Ones that have 29 days are called leap years. We would like to know if a year is a leap year or not. That can be done with a simple rule: a year is a leap year if it is divisible by 4 but is not divisible by 100. Yet, years that are divisible by 400 are also considered leaps.
notion image
Given a year print Yes if it’s a leap year and No otherwise.
Input
Output
400
Yes
2007
No
 

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue