100 atcoder#ABC159B. [ABC159B] String Palindrome

[ABC159B] String Palindrome

Score : 200200 points

Problem Statement

A string SS of an odd length is said to be a strong palindrome if and only if all of the following conditions are satisfied:

  • SS is a palindrome.
  • Let NN be the length of SS. The string formed by the 11-st through ((N1)/2)((N-1)/2)-th characters of SS is a palindrome.
  • The string consisting of the (N+3)/2(N+3)/2-st through NN-th characters of SS is a palindrome.

Determine whether SS is a strong palindrome.

Constraints

  • SS consists of lowercase English letters.
  • The length of SS is an odd number between 33 and 9999 (inclusive).

Input

Input is given from Standard Input in the following format:

SS

Output

If SS is a strong palindrome, print Yes; otherwise, print No.

akasaka
Yes
  • SS is akasaka.
  • The string formed by the 11-st through the 33-rd characters is aka.
  • The string formed by the 55-th through the 77-th characters is aka. All of these are palindromes, so SS is a strong palindrome.
level
No
atcoder
No