import java.util.*;
import java.math.BigInteger;
import static java.lang.System.*;
import java.util.*;
import java.math.BigInteger;
import static java.lang.System.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] C = new char[s.length()];
		for(int i=0; i<s.length(); i++)
			C[i] = s.charAt(i);
		boolean flag = true;
		
		for(int i=0; ; i++) {
			//out.print("i =" + i);
			int right = (s.length()-1) / 2 - 1 - i;
			//out.println("right=" + right);
			if (i >= right) break;
			if ( C[i] != C[right]) {
				//out.println("FALSE");
				flag = false; break;
			}
		}
			int left = (s.length()+3)/2 - 1;
		
			if (flag) {
		for(int i = left; ; i++) {		
			int minus = i - left;
			int right = s.length() - 1 - minus;
			//out.print("i =" + i);
			//out.println("right=" + right);
			if (i >= right) break;
			if (C[i] != C[right]) {
				flag = false; break;
			}
		}
			}
		for(int i=0; i<(s.length()-1) /2; i++) {
			int right = left + i;
			if ( C[i] != C[right]) {
				flag = false; break;
			}
		}
			
		if (flag) out.print("Yes");
		else out.print("No");
		
	}
} import java.util.*; util.* java import java.math.BigInteger; BigInteger java.math import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; import java.util.*; util.* java import java.math.BigInteger; BigInteger java.math import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] C = new char[s.length()];
		for(int i=0; i<s.length(); i++)
			C[i] = s.charAt(i);
		boolean flag = true;
		
		for(int i=0; ; i++) {
			//out.print("i =" + i);
			int right = (s.length()-1) / 2 - 1 - i;
			//out.println("right=" + right);
			if (i >= right) break;
			if ( C[i] != C[right]) {
				//out.println("FALSE");
				flag = false; break;
			}
		}
			int left = (s.length()+3)/2 - 1;
		
			if (flag) {
		for(int i = left; ; i++) {		
			int minus = i - left;
			int right = s.length() - 1 - minus;
			//out.print("i =" + i);
			//out.println("right=" + right);
			if (i >= right) break;
			if (C[i] != C[right]) {
				flag = false; break;
			}
		}
			}
		for(int i=0; i<(s.length()-1) /2; i++) {
			int right = left + i;
			if ( C[i] != C[right]) {
				flag = false; break;
			}
		}
			
		if (flag) out.print("Yes");
		else out.print("No");
		
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] C = new char[s.length()];
		for(int i=0; i<s.length(); i++)
			C[i] = s.charAt(i);
		boolean flag = true;
		
		for(int i=0; ; i++) {
			//out.print("i =" + i);
			int right = (s.length()-1) / 2 - 1 - i;
			//out.println("right=" + right);
			if (i >= right) break;
			if ( C[i] != C[right]) {
				//out.println("FALSE");
				flag = false; break;
			}
		}
			int left = (s.length()+3)/2 - 1;
		
			if (flag) {
		for(int i = left; ; i++) {		
			int minus = i - left;
			int right = s.length() - 1 - minus;
			//out.print("i =" + i);
			//out.println("right=" + right);
			if (i >= right) break;
			if (C[i] != C[right]) {
				flag = false; break;
			}
		}
			}
		for(int i=0; i<(s.length()-1) /2; i++) {
			int right = left + i;
			if ( C[i] != C[right]) {
				flag = false; break;
			}
		}
			
		if (flag) out.print("Yes");
		else out.print("No");
		
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] C = new char[s.length()];
		for(int i=0; i<s.length(); i++)
			C[i] = s.charAt(i);
		boolean flag = true;
		
		for(int i=0; ; i++) {
			//out.print("i =" + i);
			int right = (s.length()-1) / 2 - 1 - i;
			//out.println("right=" + right);
			if (i >= right) break;
			if ( C[i] != C[right]) {
				//out.println("FALSE");
				flag = false; break;
			}
		}
			int left = (s.length()+3)/2 - 1;
		
			if (flag) {
		for(int i = left; ; i++) {		
			int minus = i - left;
			int right = s.length() - 1 - minus;
			//out.print("i =" + i);
			//out.println("right=" + right);
			if (i >= right) break;
			if (C[i] != C[right]) {
				flag = false; break;
			}
		}
			}
		for(int i=0; i<(s.length()-1) /2; i++) {
			int right = left + i;
			if ( C[i] != C[right]) {
				flag = false; break;
			}
		}
			
		if (flag) out.print("Yes");
		else out.print("No");
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc char[] C = new char[s.length()]; C new char[s.length()] s.length() s.length s for(int i=0; i<s.length(); i++)
			C[i] = s.charAt(i); int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i C[i] = s.charAt(i); C[i] = s.charAt(i) C[i] C i s.charAt(i) s.charAt s i boolean flag = true; flag true for(int i=0; ; i++) {
			//out.print("i =" + i);
			int right = (s.length()-1) / 2 - 1 - i;
			//out.println("right=" + right);
			if (i >= right) break;
			if ( C[i] != C[right]) {
				//out.println("FALSE");
				flag = false; break;
			}
		} int i=0; int i=0; i 0 i++ i++ i {
			//out.print("i =" + i);
			int right = (s.length()-1) / 2 - 1 - i;
			//out.println("right=" + right);
			if (i >= right) break;
			if ( C[i] != C[right]) {
				//out.println("FALSE");
				flag = false; break;
			}
		} {
			//out.print("i =" + i);
			int right = (s.length()-1) / 2 - 1 - i;
			//out.println("right=" + right);
			if (i >= right) break;
			if ( C[i] != C[right]) {
				//out.println("FALSE");
				flag = false; break;
			}
		} int right = (s.length()-1) / 2 - 1 - i; right (s.length()-1) / 2 - 1 - i (s.length()-1) / 2 - 1 - i (s.length()-1) / 2 (s.length()-1) s.length() s.length s 1 2 1 i if (i >= right) break; i >= right i right break; if ( C[i] != C[right]) {
				//out.println("FALSE");
				flag = false; break;
			} C[i] != C[right] C[i] C i C[right] C right {
				//out.println("FALSE");
				flag = false; break;
			} flag = false flag false break; int left = (s.length()+3)/2 - 1; left (s.length()+3)/2 - 1 (s.length()+3)/2 (s.length()+3) s.length() s.length s 3 2 1 if (flag) {
		for(int i = left; ; i++) {		
			int minus = i - left;
			int right = s.length() - 1 - minus;
			//out.print("i =" + i);
			//out.println("right=" + right);
			if (i >= right) break;
			if (C[i] != C[right]) {
				flag = false; break;
			}
		}
			} flag {
		for(int i = left; ; i++) {		
			int minus = i - left;
			int right = s.length() - 1 - minus;
			//out.print("i =" + i);
			//out.println("right=" + right);
			if (i >= right) break;
			if (C[i] != C[right]) {
				flag = false; break;
			}
		}
			} for(int i = left; ; i++) {		
			int minus = i - left;
			int right = s.length() - 1 - minus;
			//out.print("i =" + i);
			//out.println("right=" + right);
			if (i >= right) break;
			if (C[i] != C[right]) {
				flag = false; break;
			}
		} int i = left; int i = left; i left i++ i++ i {		
			int minus = i - left;
			int right = s.length() - 1 - minus;
			//out.print("i =" + i);
			//out.println("right=" + right);
			if (i >= right) break;
			if (C[i] != C[right]) {
				flag = false; break;
			}
		} {		
			int minus = i - left;
			int right = s.length() - 1 - minus;
			//out.print("i =" + i);
			//out.println("right=" + right);
			if (i >= right) break;
			if (C[i] != C[right]) {
				flag = false; break;
			}
		} int minus = i - left; minus i - left i left int right = s.length() - 1 - minus; right s.length() - 1 - minus s.length() - 1 - minus s.length() s.length s 1 minus if (i >= right) break; i >= right i right break; if (C[i] != C[right]) {
				flag = false; break;
			} C[i] != C[right] C[i] C i C[right] C right {
				flag = false; break;
			} flag = false flag false break; for(int i=0; i<(s.length()-1) /2; i++) {
			int right = left + i;
			if ( C[i] != C[right]) {
				flag = false; break;
			}
		} int i=0; int i=0; i 0 i<(s.length()-1) /2 i (s.length()-1) /2 (s.length()-1) s.length() s.length s 1 2 i++ i++ i {
			int right = left + i;
			if ( C[i] != C[right]) {
				flag = false; break;
			}
		} {
			int right = left + i;
			if ( C[i] != C[right]) {
				flag = false; break;
			}
		} int right = left + i; right left + i left i if ( C[i] != C[right]) {
				flag = false; break;
			} C[i] != C[right] C[i] C i C[right] C right {
				flag = false; break;
			} flag = false flag false break; if (flag) out.print("Yes");
		else out.print("No"); flag out.print("Yes") out.print out "Yes" out.print("No") out.print out "No" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] C = new char[s.length()];
		for(int i=0; i<s.length(); i++)
			C[i] = s.charAt(i);
		boolean flag = true;
		
		for(int i=0; ; i++) {
			//out.print("i =" + i);
			int right = (s.length()-1) / 2 - 1 - i;
			//out.println("right=" + right);
			if (i >= right) break;
			if ( C[i] != C[right]) {
				//out.println("FALSE");
				flag = false; break;
			}
		}
			int left = (s.length()+3)/2 - 1;
		
			if (flag) {
		for(int i = left; ; i++) {		
			int minus = i - left;
			int right = s.length() - 1 - minus;
			//out.print("i =" + i);
			//out.println("right=" + right);
			if (i >= right) break;
			if (C[i] != C[right]) {
				flag = false; break;
			}
		}
			}
		for(int i=0; i<(s.length()-1) /2; i++) {
			int right = left + i;
			if ( C[i] != C[right]) {
				flag = false; break;
			}
		}
			
		if (flag) out.print("Yes");
		else out.print("No");
		
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] C = new char[s.length()];
		for(int i=0; i<s.length(); i++)
			C[i] = s.charAt(i);
		boolean flag = true;
		
		for(int i=0; ; i++) {
			//out.print("i =" + i);
			int right = (s.length()-1) / 2 - 1 - i;
			//out.println("right=" + right);
			if (i >= right) break;
			if ( C[i] != C[right]) {
				//out.println("FALSE");
				flag = false; break;
			}
		}
			int left = (s.length()+3)/2 - 1;
		
			if (flag) {
		for(int i = left; ; i++) {		
			int minus = i - left;
			int right = s.length() - 1 - minus;
			//out.print("i =" + i);
			//out.println("right=" + right);
			if (i >= right) break;
			if (C[i] != C[right]) {
				flag = false; break;
			}
		}
			}
		for(int i=0; i<(s.length()-1) /2; i++) {
			int right = left + i;
			if ( C[i] != C[right]) {
				flag = false; break;
			}
		}
			
		if (flag) out.print("Yes");
		else out.print("No");
		
	}
} Main
import java.util.*;
import java.math.BigInteger;
import static java.lang.System.*;
import java.util.*;
import java.math.BigInteger;
import static java.lang.System.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		char[] C = new char[s.length()];
		for(int i=0; i<s.length(); i++)
			C[i] = s.charAt(i);
		boolean flag = true;
		
		for(int i=0; ; i++) {
			//out.print("i =" + i);
			int right = (s.length()-1) / 2 - 1 - i;
			//out.println("right=" + right);
			if (i >= right) break;
			if ( C[i] != C[right]) {
				//out.println("FALSE");
				flag = false; break;
			}
		}
			int left = (s.length()+3)/2 - 1;
		
			if (flag) {
		for(int i = left; ; i++) {		
			int minus = i - left;
			int right = s.length() - 1 - minus;
			//out.print("i =" + i);
			//out.println("right=" + right);
			if (i >= right) break;
			if (C[i] != C[right]) {
				flag = false; break;
			}
		}
			}
		for(int i=0; i<(s.length()-1) /2; i++) {
			int right = left + i;
			if ( C[i] != C[right]) {
				flag = false; break;
			}
		}
			
		if (flag) out.print("Yes");
		else out.print("No");
		
	}
}