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++14 (GCC 5.4.1) (judge verdict: Accepted)

//Author: Fuadul Hasan(fuadul202@gmail.com)
//BSMRSTU,Gopalganj
#include<bits/stdc++.h>
using namespace std;
void  print(int n)    {printf("%d ", n);}
void  printl(long long n)     {printf("%I64d ", n);}
long long  readline(){long long x;scanf("%I64d", &x);return x;}
template <typename T> inline void readline(T &n) {
  n = 0; int f = 1; register int ch = getchar();
  for (; !isdigit(ch); ch = getchar()) if (ch == '-') f = -1;
  for (; isdigit(ch); ch = getchar()) n = (n << 3) + (n << 1) + ch - '0';n = n * f;}
template <typename T, typename TT> inline void readline(T &n, TT &m) { readline(n); readline(m); }
template <typename T, typename TT, typename TTT> inline void readline(T &n, TT &m, TTT &l) { readline(n, m); readline(l);}
#define error(args...) {vector<string>_v=split(#args,',');err(_v.begin(),args);cout<<endl;}
vector<string> split(const string &s, char c) {vector<string>v; stringstream ss(s); string x;
  while (getline(ss, x, c))v.emplace_back(x); return move(v);} void err(vector<string>::iterator it) {}
template<typename T, typename... Args>void err(vector<string>::iterator it, T a, Args...args) {
cout << it->substr((*it)[0] == ' ', it->length()) << " = " << a << " "; err(++it, args...);}
#define   all(n) n.begin(),n.end()
#define  pb             push_back
#define  ll             long long int
#define  nl             printf("\n");
#define  happy          cin.tie(0);
#define  coding         ios::sync_with_stdio(false);
int dx[8]= {1,0,-1,0,-1,-1,1,1};
int dy[8]= {0,1,0,-1,-1,1,-1,1};
const int mod           = 1e9 + 7;
const int inf           = (int)2e9 + 5;
const ll  Inf           = (ll)2e18 + 5;

typedef   pair<int, int> ii;
typedef   std::vector<ii> vii;
#define   vi   std::vector<int>
#define   vll  std::vector<ll>
#define  mpsi std::map<string, int>

const int N             = 4e5 + 5;
const int N1            = 1e5 + 5;
int a[N];
string s;

bool isPal(int s1 ,int e)
{
	//error(s1,e);
	int z =0;
	for(int i=s1;i<(s1+e+1)/2;i++){
		//error(i,e-1-z);
		if(s[i]!=s[e-1-z++]){
			return false;
		}
	}
	return true;
}

int solve() 
{
	//happy coding
	cin>>s;
	int n = s.size();
	if(isPal(0,n)){
		if(isPal(0,(n-1)/2)){
		if(isPal((n+3)/2-1,n)) {
			cout<<"Yes"<<endl;
		}
		else
			cout<<"No"<<endl;
		}else{
		cout<<"No"<<endl;
		}
	}else{
		cout<<"No"<<endl;
	}
	//if(isPal((n+3)/2-1,n)) cout<<"Yes"<<endl;
	return 0;
	//error();
}
int main(){
	int test = 1, tc = 0;
	//scanf("%d", &test);//(void)getchar();
	while (test--)solve();
	return 0;
}