Codeforces Round 410 (Div. 2)
A
Mike and palindrome
Codeforces
1000
原题
←B →
翻译中…

Mike has a string $*s*$ consisting of only lowercase English letters. He wants to change exactly one character from the string so that the resulting one is a palindrome.

翻译中…

A palindrome is a string that reads the same backward as forward, for example strings "z", "aaa", "aba", "abccba" are palindromes, but strings "codeforces", "reality", "ab" are not.

翻译中…

Input

翻译中…

The first and single line contains string $*s*$ ($1 ≤ |*s*| ≤ 15$).

翻译中…

Output

翻译中…

Print "YES" (without quotes) if Mike can change exactly one character so that the resulting string is palindrome or "NO" (without quotes) otherwise.

翻译中…

样例

Input #1
abccaa
Output #1
YES
InputCopy OutputCopy
Input #2
abbcca
Output #2
NO
InputCopy OutputCopy
Input #3
abcda
Output #3
YES
InputCopy OutputCopy
题目信息
题号
798A
时间限制
2 s
内存限制
256 MB
标签
暴力
构造
字符串

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。