403030: GYM100971 K Palindromization

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

K. Palindromizationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

Mihahim has a string s. He wants to delete exactly one character from it so that the resulting string would be a palindrome. Determine if he can do it, and if he can, what character should be deleted.

Input

The input contains a string s of length (2 ≤ |s| ≤ 200000), consisting of lowercase Latin letters.

Output

If the solution exists, output «YES» (without quotes) in the first line. Then in the second line output a single integer x — the number of the character that should be removed from s so that the resulting string would be a palindrome. The characters in the string are numbered from 1. If there are several possible solutions, output any of them.

If the solution doesn't exist, output «NO» (without quotes).

ExamplesInput
evertree
Output
YES
2
Input
emerald
Output
NO
Input
aa
Output
YES
2

加入题单

上一题 下一题 算法标签: