#C8226. Valid Date Checker

    ID: 52185 Type: Default 1000ms 256MiB

Valid Date Checker

Valid Date Checker

The task is to determine whether a given date string is valid. The date string will always be provided in the format $YYYY-MM-DD$. You must check that the year, month, and day form a valid calendar date. For example, ensure that the month is between 1 and 12 and that the day is valid for the given month (taking leap years into account). If the date is valid, output Yes; otherwise, output No.

Note: A leap year is defined as follows: a year is a leap year if it is divisible by 400, or it is divisible by 4 but not by 100.

inputFormat

The input consists of a single line containing a date string in the format YYYY-MM-DD.

outputFormat

Output a single line: Yes if the date is valid, and No otherwise.

## sample
2023-12-31
Yes