import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

//		int a = sc.nextInt();
//		int b = sc.nextInt();
//		int res = 0;
		String s = sc.next();
		String res = "";
		boolean r = false;
		int len = s.length();



		r = isKaibun(s);

		if(r) {
			String tmp = s.substring(0, (len-1)/2 );
//			System.out.println(tmp);
			r = isKaibun(tmp);
		}
//		if(true) {
		if(r) {
			String tmp = s.substring((len+3)/2-1, len );
//			System.out.println(tmp);
			r = isKaibun(tmp);
		}

		//System.out.printf("%d\n", res);
		//System.out.printf("%d", res);
		if(r) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}


	static boolean isKaibun(String s) {
		if(s.length() <= 1) {
			return true;
		}

		if(s.charAt(0) == s.charAt(s.length()-1)) {
			if(s.length() == 2) {
				return true;
			} else {
				String tmp = s.substring(1, s.length()-1);
//				System.out.println(tmp);
				return isKaibun(tmp);
			}
		} else {
			return false;
		}

	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

//		int a = sc.nextInt();
//		int b = sc.nextInt();
//		int res = 0;
		String s = sc.next();
		String res = "";
		boolean r = false;
		int len = s.length();



		r = isKaibun(s);

		if(r) {
			String tmp = s.substring(0, (len-1)/2 );
//			System.out.println(tmp);
			r = isKaibun(tmp);
		}
//		if(true) {
		if(r) {
			String tmp = s.substring((len+3)/2-1, len );
//			System.out.println(tmp);
			r = isKaibun(tmp);
		}

		//System.out.printf("%d\n", res);
		//System.out.printf("%d", res);
		if(r) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}


	static boolean isKaibun(String s) {
		if(s.length() <= 1) {
			return true;
		}

		if(s.charAt(0) == s.charAt(s.length()-1)) {
			if(s.length() == 2) {
				return true;
			} else {
				String tmp = s.substring(1, s.length()-1);
//				System.out.println(tmp);
				return isKaibun(tmp);
			}
		} else {
			return false;
		}

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

//		int a = sc.nextInt();
//		int b = sc.nextInt();
//		int res = 0;
		String s = sc.next();
		String res = "";
		boolean r = false;
		int len = s.length();



		r = isKaibun(s);

		if(r) {
			String tmp = s.substring(0, (len-1)/2 );
//			System.out.println(tmp);
			r = isKaibun(tmp);
		}
//		if(true) {
		if(r) {
			String tmp = s.substring((len+3)/2-1, len );
//			System.out.println(tmp);
			r = isKaibun(tmp);
		}

		//System.out.printf("%d\n", res);
		//System.out.printf("%d", res);
		if(r) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);

//		int a = sc.nextInt();
//		int b = sc.nextInt();
//		int res = 0;
		String s = sc.next();
		String res = "";
		boolean r = false;
		int len = s.length();



		r = isKaibun(s);

		if(r) {
			String tmp = s.substring(0, (len-1)/2 );
//			System.out.println(tmp);
			r = isKaibun(tmp);
		}
//		if(true) {
		if(r) {
			String tmp = s.substring((len+3)/2-1, len );
//			System.out.println(tmp);
			r = isKaibun(tmp);
		}

		//System.out.printf("%d\n", res);
		//System.out.printf("%d", res);
		if(r) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String res = ""; res "" boolean r = false; r false int len = s.length(); len s.length() s.length s r = isKaibun(s) r isKaibun(s) isKaibun s if(r) {
			String tmp = s.substring(0, (len-1)/2 );
//			System.out.println(tmp);
			r = isKaibun(tmp);
		} r {
			String tmp = s.substring(0, (len-1)/2 );
//			System.out.println(tmp);
			r = isKaibun(tmp);
		} String tmp = s.substring(0, (len-1)/2 ); tmp s.substring(0, (len-1)/2 ) s.substring s 0 (len-1)/2 (len-1) len 1 2 r = isKaibun(tmp) r isKaibun(tmp) isKaibun tmp if(r) {
			String tmp = s.substring((len+3)/2-1, len );
//			System.out.println(tmp);
			r = isKaibun(tmp);
		} r {
			String tmp = s.substring((len+3)/2-1, len );
//			System.out.println(tmp);
			r = isKaibun(tmp);
		} String tmp = s.substring((len+3)/2-1, len ); tmp s.substring((len+3)/2-1, len ) s.substring s (len+3)/2-1 (len+3)/2 (len+3) len 3 2 1 len r = isKaibun(tmp) r isKaibun(tmp) isKaibun tmp if(r) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} r {
			System.out.println("Yes");
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args static boolean isKaibun(String s) {
		if(s.length() <= 1) {
			return true;
		}

		if(s.charAt(0) == s.charAt(s.length()-1)) {
			if(s.length() == 2) {
				return true;
			} else {
				String tmp = s.substring(1, s.length()-1);
//				System.out.println(tmp);
				return isKaibun(tmp);
			}
		} else {
			return false;
		}

	} isKaibun {
		if(s.length() <= 1) {
			return true;
		}

		if(s.charAt(0) == s.charAt(s.length()-1)) {
			if(s.length() == 2) {
				return true;
			} else {
				String tmp = s.substring(1, s.length()-1);
//				System.out.println(tmp);
				return isKaibun(tmp);
			}
		} else {
			return false;
		}

	} if(s.length() <= 1) {
			return true;
		} s.length() <= 1 s.length() s.length s 1 {
			return true;
		} return true; true if(s.charAt(0) == s.charAt(s.length()-1)) {
			if(s.length() == 2) {
				return true;
			} else {
				String tmp = s.substring(1, s.length()-1);
//				System.out.println(tmp);
				return isKaibun(tmp);
			}
		} else {
			return false;
		} s.charAt(0) == s.charAt(s.length()-1) s.charAt(0) s.charAt s 0 s.charAt(s.length()-1) s.charAt s s.length()-1 s.length() s.length s 1 {
			if(s.length() == 2) {
				return true;
			} else {
				String tmp = s.substring(1, s.length()-1);
//				System.out.println(tmp);
				return isKaibun(tmp);
			}
		} if(s.length() == 2) {
				return true;
			} else {
				String tmp = s.substring(1, s.length()-1);
//				System.out.println(tmp);
				return isKaibun(tmp);
			} s.length() == 2 s.length() s.length s 2 {
				return true;
			} return true; true {
				String tmp = s.substring(1, s.length()-1);
//				System.out.println(tmp);
				return isKaibun(tmp);
			} String tmp = s.substring(1, s.length()-1); tmp s.substring(1, s.length()-1) s.substring s 1 s.length()-1 s.length() s.length s 1 return isKaibun(tmp); isKaibun(tmp) isKaibun tmp {
			return false;
		} return false; false String s s public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

//		int a = sc.nextInt();
//		int b = sc.nextInt();
//		int res = 0;
		String s = sc.next();
		String res = "";
		boolean r = false;
		int len = s.length();



		r = isKaibun(s);

		if(r) {
			String tmp = s.substring(0, (len-1)/2 );
//			System.out.println(tmp);
			r = isKaibun(tmp);
		}
//		if(true) {
		if(r) {
			String tmp = s.substring((len+3)/2-1, len );
//			System.out.println(tmp);
			r = isKaibun(tmp);
		}

		//System.out.printf("%d\n", res);
		//System.out.printf("%d", res);
		if(r) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}


	static boolean isKaibun(String s) {
		if(s.length() <= 1) {
			return true;
		}

		if(s.charAt(0) == s.charAt(s.length()-1)) {
			if(s.length() == 2) {
				return true;
			} else {
				String tmp = s.substring(1, s.length()-1);
//				System.out.println(tmp);
				return isKaibun(tmp);
			}
		} else {
			return false;
		}

	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

//		int a = sc.nextInt();
//		int b = sc.nextInt();
//		int res = 0;
		String s = sc.next();
		String res = "";
		boolean r = false;
		int len = s.length();



		r = isKaibun(s);

		if(r) {
			String tmp = s.substring(0, (len-1)/2 );
//			System.out.println(tmp);
			r = isKaibun(tmp);
		}
//		if(true) {
		if(r) {
			String tmp = s.substring((len+3)/2-1, len );
//			System.out.println(tmp);
			r = isKaibun(tmp);
		}

		//System.out.printf("%d\n", res);
		//System.out.printf("%d", res);
		if(r) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}


	static boolean isKaibun(String s) {
		if(s.length() <= 1) {
			return true;
		}

		if(s.charAt(0) == s.charAt(s.length()-1)) {
			if(s.length() == 2) {
				return true;
			} else {
				String tmp = s.substring(1, s.length()-1);
//				System.out.println(tmp);
				return isKaibun(tmp);
			}
		} else {
			return false;
		}

	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

//		int a = sc.nextInt();
//		int b = sc.nextInt();
//		int res = 0;
		String s = sc.next();
		String res = "";
		boolean r = false;
		int len = s.length();



		r = isKaibun(s);

		if(r) {
			String tmp = s.substring(0, (len-1)/2 );
//			System.out.println(tmp);
			r = isKaibun(tmp);
		}
//		if(true) {
		if(r) {
			String tmp = s.substring((len+3)/2-1, len );
//			System.out.println(tmp);
			r = isKaibun(tmp);
		}

		//System.out.printf("%d\n", res);
		//System.out.printf("%d", res);
		if(r) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}


	static boolean isKaibun(String s) {
		if(s.length() <= 1) {
			return true;
		}

		if(s.charAt(0) == s.charAt(s.length()-1)) {
			if(s.length() == 2) {
				return true;
			} else {
				String tmp = s.substring(1, s.length()-1);
//				System.out.println(tmp);
				return isKaibun(tmp);
			}
		} else {
			return false;
		}

	}
}
