Winnie-the-Pooh's long-awaited Anniversary has arrived. Many guests have gathered in the enchanted forest to celebrate. Among them, Winnie-the-Pooh also invited friends from other galaxies. However, when sending the invitations, he completely forgot that on the planet where his alien friends live, everyone reads from right to left instead of left to right. Although the aliens will not arrive in time for the Anniversary, Winnie-the-Pooh is not discouraged. He wants to check if the date of his Anniversary, when read from right to left, is also a valid date, so perhaps the aliens will arrive on another day. Help Winnie-the-Pooh determine whether he should expect his alien friends to visit.
The input file contains the date of Winnie-the-Pooh's Anniversary in the format dd.mm.yyyy. It is guaranteed that the date is correct.
The output file should contain YES if the date read from right to left is valid, and NO otherwise.
Example 1