import java.util.*;


public class Main {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		char[] s = S.toCharArray();
		int n = S.length();
		boolean OK = true;
			int i = 0;
			int j = (n-1)/2-1;
			while(j-i>=1) {
				if(s[i]==s[j] && s[n-1-i]==s[n-1-j]) {
				i++;
				j--;
				
				} 
				else {
					OK = false;
					break;
				}
			}
			for(int k = 0; k < n/2; k++) {
				if(s[k]!=s[n-1-k]) {
					OK = false;
					break;
				}
			}
		System.out.println(OK?"Yes":"No");
	}
} import java.util.*; util.* java public class Main {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		char[] s = S.toCharArray();
		int n = S.length();
		boolean OK = true;
			int i = 0;
			int j = (n-1)/2-1;
			while(j-i>=1) {
				if(s[i]==s[j] && s[n-1-i]==s[n-1-j]) {
				i++;
				j--;
				
				} 
				else {
					OK = false;
					break;
				}
			}
			for(int k = 0; k < n/2; k++) {
				if(s[k]!=s[n-1-k]) {
					OK = false;
					break;
				}
			}
		System.out.println(OK?"Yes":"No");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		char[] s = S.toCharArray();
		int n = S.length();
		boolean OK = true;
			int i = 0;
			int j = (n-1)/2-1;
			while(j-i>=1) {
				if(s[i]==s[j] && s[n-1-i]==s[n-1-j]) {
				i++;
				j--;
				
				} 
				else {
					OK = false;
					break;
				}
			}
			for(int k = 0; k < n/2; k++) {
				if(s[k]!=s[n-1-k]) {
					OK = false;
					break;
				}
			}
		System.out.println(OK?"Yes":"No");
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		char[] s = S.toCharArray();
		int n = S.length();
		boolean OK = true;
			int i = 0;
			int j = (n-1)/2-1;
			while(j-i>=1) {
				if(s[i]==s[j] && s[n-1-i]==s[n-1-j]) {
				i++;
				j--;
				
				} 
				else {
					OK = false;
					break;
				}
			}
			for(int k = 0; k < n/2; k++) {
				if(s[k]!=s[n-1-k]) {
					OK = false;
					break;
				}
			}
		System.out.println(OK?"Yes":"No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc char[] s = S.toCharArray(); s S.toCharArray() S.toCharArray S int n = S.length(); n S.length() S.length S boolean OK = true; OK true int i = 0; i 0 int j = (n-1)/2-1; j (n-1)/2-1 (n-1)/2 (n-1) n 1 2 1 while(j-i>=1) {
				if(s[i]==s[j] && s[n-1-i]==s[n-1-j]) {
				i++;
				j--;
				
				} 
				else {
					OK = false;
					break;
				}
			} j-i>=1 j-i j i 1 {
				if(s[i]==s[j] && s[n-1-i]==s[n-1-j]) {
				i++;
				j--;
				
				} 
				else {
					OK = false;
					break;
				}
			} if(s[i]==s[j] && s[n-1-i]==s[n-1-j]) {
				i++;
				j--;
				
				} 
				else {
					OK = false;
					break;
				} s[i]==s[j] && s[n-1-i]==s[n-1-j] s[i]==s[j] s[i] s i s[j] s j s[n-1-i]==s[n-1-j] s[n-1-i] s n-1-i n-1-i n 1 i s[n-1-j] s n-1-j n-1-j n 1 j {
				i++;
				j--;
				
				} i++ i j-- j {
					OK = false;
					break;
				} OK = false OK false break; for(int k = 0; k < n/2; k++) {
				if(s[k]!=s[n-1-k]) {
					OK = false;
					break;
				}
			} int k = 0; int k = 0; k 0 k < n/2 k n/2 n 2 k++ k++ k {
				if(s[k]!=s[n-1-k]) {
					OK = false;
					break;
				}
			} {
				if(s[k]!=s[n-1-k]) {
					OK = false;
					break;
				}
			} if(s[k]!=s[n-1-k]) {
					OK = false;
					break;
				} s[k]!=s[n-1-k] s[k] s k s[n-1-k] s n-1-k n-1-k n 1 k {
					OK = false;
					break;
				} OK = false OK false break; System.out.println(OK?"Yes":"No") System.out.println System.out System System.out OK?"Yes":"No" OK "Yes" "No" String[] args args public class Main {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		char[] s = S.toCharArray();
		int n = S.length();
		boolean OK = true;
			int i = 0;
			int j = (n-1)/2-1;
			while(j-i>=1) {
				if(s[i]==s[j] && s[n-1-i]==s[n-1-j]) {
				i++;
				j--;
				
				} 
				else {
					OK = false;
					break;
				}
			}
			for(int k = 0; k < n/2; k++) {
				if(s[k]!=s[n-1-k]) {
					OK = false;
					break;
				}
			}
		System.out.println(OK?"Yes":"No");
	}
} public class Main {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		char[] s = S.toCharArray();
		int n = S.length();
		boolean OK = true;
			int i = 0;
			int j = (n-1)/2-1;
			while(j-i>=1) {
				if(s[i]==s[j] && s[n-1-i]==s[n-1-j]) {
				i++;
				j--;
				
				} 
				else {
					OK = false;
					break;
				}
			}
			for(int k = 0; k < n/2; k++) {
				if(s[k]!=s[n-1-k]) {
					OK = false;
					break;
				}
			}
		System.out.println(OK?"Yes":"No");
	}
} Main
import java.util.*;


public class Main {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		char[] s = S.toCharArray();
		int n = S.length();
		boolean OK = true;
			int i = 0;
			int j = (n-1)/2-1;
			while(j-i>=1) {
				if(s[i]==s[j] && s[n-1-i]==s[n-1-j]) {
				i++;
				j--;
				
				} 
				else {
					OK = false;
					break;
				}
			}
			for(int k = 0; k < n/2; k++) {
				if(s[k]!=s[n-1-k]) {
					OK = false;
					break;
				}
			}
		System.out.println(OK?"Yes":"No");
	}
}