PROGRAMMING:Function returns whether a date is palindrome date
Write a function that returns whether a date is palindrome date. Palindrome date should be legal date first, and then the 8-digit integer composed of month, year and day is palindrome number (left and right symmetry). The main function is required to input an 8-bit positive integer representing the date (for example, 20500502 represents May 2, 2050), and output whether the date is palindrome date.
###Input example: (prompt: not legal date)
```in
fifty million two hundred thousand two hundred and fifty
```
###Output example:
```out
NO
```
###Input example: (prompt: Legal date is not palindrome)
```in
twenty million five hundred thousand five hundred and three
```
###Output example:
```out
NO
```
###Input example:
```in
twenty million two hundred thousand two hundred and two
```
###Output example:
```out
YES
```
answer:If there is no answer, please comment
###Input example: (prompt: not legal date)
```in
fifty million two hundred thousand two hundred and fifty
```
###Output example:
```out
NO
```
###Input example: (prompt: Legal date is not palindrome)
```in
twenty million five hundred thousand five hundred and three
```
###Output example:
```out
NO
```
###Input example:
```in
twenty million two hundred thousand two hundred and two
```
###Output example:
```out
YES
```
answer:If there is no answer, please comment