Winnie-the-Pooh's Anniversary
Winnie-the-Pooh's long-awaited Anniversary is here, and many guests have gathered in the enchanted forest to celebrate. Among them, Winnie-the-Pooh invited friends from other galaxies. However, he forgot that on the planet where his alien friends live, everyone reads from right to left instead of left to right. Although they won't arrive by the Anniversary, Winnie-the-Pooh is hopeful. He wants to check if the date of his Anniversary, when read from right to left, is also a valid date, so the aliens might visit on another day. Help Winnie-the-Pooh find out if he should expect his alien friends to come.
Input
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 valid.
Output
The output file should contain YES if the date read from right to left is valid, and NO otherwise.