Valid Palindrome

EasyStrings
Next
StringTwo Pointers

A phrase is a palindrome if, after converting all letters to lowercase and removing everything that is not a letter or digit, it reads the same forwards and backwards. Decide whether the given line is a palindrome.

Input

A single line of text.

Output

Print true or false.

Constraints

1 <= length <= 10^5

Example 1
Input
A man, a plan, a canal: Panama
Output
true

Cleaned up it reads amanaplanacanalpanama.

Example 2
Input
race a car
Output
false

Cleaned up it reads raceacar, which is not a palindrome.

Hints

Valid Palindrome - Easy Strings Problem | Skill Shiksha