#include<iostream>
using namespace std;

int main(){
  string S;
  cin >> S;
  int N = S.length();
  for(int i=0; i<(N-1)/2; i++){
    if(S[i]!=S[(N-1)/2-1-i]||S[(N+3)/2-1+i]!=S[N-1-i]||S[i]!=S[N-1-i]){
      cout<<"No"<<endl;
      return 0;
    }
  }
  cout<<"Yes"<<endl;
  return 0;
}