#include <bits/stdc++.h>
using namespace std;
 
int main(){
  string s;
  int n,i,kotae=1;
  cin>>s;
  n=s.length();
  for(i=0;i<=(n-3)/4;i++){
    if(s[i]==s[n-1-i]&&s[(n+1)/2+i]==s[(n-3)/2-i]&&s[i]==s[(n+1)/2+i]){
    }else{
      kotae=0;
    }
  }
  if(kotae){
    cout<<"Yes";
  }else{
    cout<<"No";
  }
}
