#abc159b. [abc159_b]String Palindrome
[abc159_b]String Palindrome
Problem Statement
A string of an odd length is said to be a strong palindrome if and only if all of the following conditions are satisfied:
- is a palindrome.
- Let be the length of . The string formed by the -st through -th characters of is a palindrome.
- The string consisting of the -st through -th characters of is a palindrome.
Determine whether is a strong palindrome.
Constraints
- consists of lowercase English letters.
- The length of is an odd number between and (inclusive).
Input
Input is given from Standard Input in the following format:
Output
If is a strong palindrome, print Yes
; otherwise, print No
.
Sample Input 1
akasaka
Sample Output 1
Yes
- is
akasaka
. - The string formed by the -st through the -rd characters is
aka
. - The string formed by the -th through the -th characters is
aka
. All of these are palindromes, so is a strong palindrome.
Sample Input 2
level
Sample Output 2
No
Sample Input 3
atcoder
Sample Output 3
No