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](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F32f4f378-ae87-466b-afa1-4407ab18fe90%2Faws4_requestX-Amz-Date20220415T100015ZX-Amz-Expires86400X-Amz-Signature3884321acecfbca277c25ba5434521e4663b0703bad623268765fe2dd5a059dfX-Amz-SignedHeadershostx-idGetObject.png?table=block&id=dbf78980-2b36-48a6-9832-d5f400896f73&cache=v2)
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