- Time limit: 1.00 s
- Memory limit: 512 MB
Teemu likes collecting books, especially those which are palindromes. Unfortunately books are long and Teemu does not exactly fancy reading. That's why he has asked you to help to decide if the books is a palindrome and hence worth adding to his collection.
A book is a palindrome if it reads the same from front to back and back to front ignoring the case and non-letter characters.
Input
The input contains the contents of the book s on a single line. The book may contain space characters (ASCII 32) and any printable ASCII characters.
Output
Print YES
if the book is a palindrome and NO
if the book is not.
Limits
- 1 \le \text{length}(s) \le 10^6
Example
Input:
No 'x' in Nixon.
Output:
YES
The input is noxinnixon
when non-letter characters have been removed and letters have been converted to lower case.
Input:
This is not a palindrome
Output:
NO