Problem:
Score : 200 points

Problem Statement

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

S is a palindrome.

Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome.

The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome.

Determine whether S is a strong palindrome.

Constraints

S consists of lowercase English letters.

The length of S is an odd number between 3 and 99 (inclusive).

Input

Input is given from Standard Input in the following format:

S

Output

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

Sample Input 1

akasaka

Sample Output 1

Yes

S is akasaka.

The string formed by the 1-st through the 3-rd characters is aka.

The string formed by the 5-th through the 7-th characters is aka.
All of these are palindromes, so S is a strong palindrome.

Sample Input 2

level

Sample Output 2

No

Sample Input 3

atcoder

Sample Output 3

No

Solution in C# (Mono 4.6.2.0) (judge verdict: Accepted)

using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Numerics;

namespace abc159
{
    class Program
    {
        static void Main(string[] args)
        {
            if (File.Exists("input.txt"))
            {
                Console.SetIn(new StreamReader("input.txt"));
            }
			solve_abc159B();
        }

        public static void solve_abc159B()
        {
            string s = Console.ReadLine();
            bool ok = true;

            int l = 0;
            int r = s.Length - 1;
            ok = isPalindrom(s, l, r);
            if (ok)
            {
                ok = isPalindrom(s, 0, ((s.Length - 1) / 2) - 1);
            }
            if (ok)
            {
                ok = isPalindrom(s, ((s.Length + 3) / 2) - 1, s.Length - 1);
            }
            if (ok)
            {
                Console.WriteLine("Yes");
            }
            else
            {
                Console.WriteLine("No");
            }
        }

        public static bool isPalindrom(string s, int l, int r)
        {
            bool ok = true;
            while (l < r)
            {
                if (s[l] != s[r])
                {
                    ok = false;
                    break;
                }
                l++;
                r--;
            }
            return ok;
        }

        public static void solve_abc159A()
        {
            int[] nm = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
            long even = 0;
            if (nm[0] > 1)
            {
                even = combs(nm[0], 2);
            }
            long odd = 0;
            if (nm[1] > 1)
            {
                odd = combs(nm[1], 2);
            }
            Console.WriteLine(even + odd);
        }
        public static long combs(int n, int k)
        {
	        int res = 1;
	        for (int i = n - k + 1; i <= n; i++)
            {
		        res *= i;
            }
	        for (int i = 2; i <= k; i++)
            {
		        res /= i;
            }
            return res;
            /*double res = 1;
	        for (int i = 1; i <= k; i++)
            {
		        res = res * (n - k + i) / i;
            }
	        return (long) (res + 0.01);
            */
        }
    }
}