import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		// int m = sc.nextInt();

		int n = s.length();
		boolean isPal = true;
		for (int i = 0; i < (n - 1) / 2; i++) {
			if (s.charAt(i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		}
		for (int i = 0; i < n / 4; i++) {
			if (s.charAt(i) == s.charAt((n - 3) / 2 - i) && s.charAt((n + 3) / 2 - 1 + i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		}
		if (isPal) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		// int m = sc.nextInt();

		int n = s.length();
		boolean isPal = true;
		for (int i = 0; i < (n - 1) / 2; i++) {
			if (s.charAt(i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		}
		for (int i = 0; i < n / 4; i++) {
			if (s.charAt(i) == s.charAt((n - 3) / 2 - i) && s.charAt((n + 3) / 2 - 1 + i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		}
		if (isPal) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		// int m = sc.nextInt();

		int n = s.length();
		boolean isPal = true;
		for (int i = 0; i < (n - 1) / 2; i++) {
			if (s.charAt(i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		}
		for (int i = 0; i < n / 4; i++) {
			if (s.charAt(i) == s.charAt((n - 3) / 2 - i) && s.charAt((n + 3) / 2 - 1 + i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		}
		if (isPal) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		// int m = sc.nextInt();

		int n = s.length();
		boolean isPal = true;
		for (int i = 0; i < (n - 1) / 2; i++) {
			if (s.charAt(i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		}
		for (int i = 0; i < n / 4; i++) {
			if (s.charAt(i) == s.charAt((n - 3) / 2 - i) && s.charAt((n + 3) / 2 - 1 + i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		}
		if (isPal) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc int n = s.length(); n s.length() s.length s boolean isPal = true; isPal true for (int i = 0; i < (n - 1) / 2; i++) {
			if (s.charAt(i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		} int i = 0; int i = 0; i 0 i < (n - 1) / 2 i (n - 1) / 2 (n - 1) n 1 2 i++ i++ i {
			if (s.charAt(i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		} {
			if (s.charAt(i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		} if (s.charAt(i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			} s.charAt(i) == s.charAt(n - 1 - i) s.charAt(i) s.charAt s i s.charAt(n - 1 - i) s.charAt s n - 1 - i n - 1 - i n 1 i {
				continue;
			} continue; {
				isPal = false;
				break;
			} isPal = false isPal false break; for (int i = 0; i < n / 4; i++) {
			if (s.charAt(i) == s.charAt((n - 3) / 2 - i) && s.charAt((n + 3) / 2 - 1 + i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		} int i = 0; int i = 0; i 0 i < n / 4 i n / 4 n 4 i++ i++ i {
			if (s.charAt(i) == s.charAt((n - 3) / 2 - i) && s.charAt((n + 3) / 2 - 1 + i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		} {
			if (s.charAt(i) == s.charAt((n - 3) / 2 - i) && s.charAt((n + 3) / 2 - 1 + i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		} if (s.charAt(i) == s.charAt((n - 3) / 2 - i) && s.charAt((n + 3) / 2 - 1 + i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			} s.charAt(i) == s.charAt((n - 3) / 2 - i) && s.charAt((n + 3) / 2 - 1 + i) == s.charAt(n - 1 - i) s.charAt(i) == s.charAt((n - 3) / 2 - i) s.charAt(i) s.charAt s i s.charAt((n - 3) / 2 - i) s.charAt s (n - 3) / 2 - i (n - 3) / 2 (n - 3) n 3 2 i s.charAt((n + 3) / 2 - 1 + i) == s.charAt(n - 1 - i) s.charAt((n + 3) / 2 - 1 + i) s.charAt s (n + 3) / 2 - 1 + i (n + 3) / 2 - 1 (n + 3) / 2 (n + 3) n 3 2 1 i s.charAt(n - 1 - i) s.charAt s n - 1 - i n - 1 - i n 1 i {
				continue;
			} continue; {
				isPal = false;
				break;
			} isPal = false isPal false break; if (isPal) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} isPal {
			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" sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		// int m = sc.nextInt();

		int n = s.length();
		boolean isPal = true;
		for (int i = 0; i < (n - 1) / 2; i++) {
			if (s.charAt(i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		}
		for (int i = 0; i < n / 4; i++) {
			if (s.charAt(i) == s.charAt((n - 3) / 2 - i) && s.charAt((n + 3) / 2 - 1 + i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		}
		if (isPal) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		// int m = sc.nextInt();

		int n = s.length();
		boolean isPal = true;
		for (int i = 0; i < (n - 1) / 2; i++) {
			if (s.charAt(i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		}
		for (int i = 0; i < n / 4; i++) {
			if (s.charAt(i) == s.charAt((n - 3) / 2 - i) && s.charAt((n + 3) / 2 - 1 + i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		}
		if (isPal) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		// int m = sc.nextInt();

		int n = s.length();
		boolean isPal = true;
		for (int i = 0; i < (n - 1) / 2; i++) {
			if (s.charAt(i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		}
		for (int i = 0; i < n / 4; i++) {
			if (s.charAt(i) == s.charAt((n - 3) / 2 - i) && s.charAt((n + 3) / 2 - 1 + i) == s.charAt(n - 1 - i)) {
				continue;
			} else {
				isPal = false;
				break;
			}
		}
		if (isPal) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	}
}