#include<bits/stdc++.h>
using namespace std;
int n;
string s;
int main(){
  cin>>s;
  n=s.size();
  for(int i=1;i<=(n-1)/2;i++)
{
	if(s[i-1]!=s[(n+1)/2-1-i]||s[i-1]!=s[(n+1)/2-1+i]||s[i-1]!=s[n-i])
	 {cout<<"No";return 0;
	  } 
}
cout<<"Yes";
return 0;
}

