#K68482. Palindrome Transformation with At Most Two Removals

    ID: 32874 Type: Default 1000ms 256MiB

Palindrome Transformation with At Most Two Removals

Palindrome Transformation with At Most Two Removals

You are given a string s. Determine if it is possible to transform s into a palindrome by removing at most two characters. A palindrome is a string that reads the same forwards and backwards. Formally, a string s of length \(n\) is a palindrome if for every index \(i\) (0-based), \(s[i] = s[n - i - 1]\).

If it is possible to obtain a palindrome from s by removing at most \(2\) characters, print YES; otherwise, print NO.

inputFormat

The input consists of a single line containing the string s (which may be empty). The string is composed of lowercase English letters.

outputFormat

Output a single line containing either YES if it is possible to transform s into a palindrome by removing at most two characters, or NO otherwise.

## sample
radar
YES