import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		sc.close();
		int N = S.length();
		//S全体が回文であるかチェック
		for (int i = 0; i < (N - 1) / 2; i++) {
			if (S.charAt(i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		}

		for (int i = 0; i < (N - 1) / 4; i++) {
			if (S.charAt(i) != S.charAt((N - 3) / 2 - i)
					|| S.charAt((N + 1) / 2 + i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
} 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();
		sc.close();
		int N = S.length();
		//S全体が回文であるかチェック
		for (int i = 0; i < (N - 1) / 2; i++) {
			if (S.charAt(i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		}

		for (int i = 0; i < (N - 1) / 4; i++) {
			if (S.charAt(i) != S.charAt((N - 3) / 2 - i)
					|| S.charAt((N + 1) / 2 + i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		sc.close();
		int N = S.length();
		//S全体が回文であるかチェック
		for (int i = 0; i < (N - 1) / 2; i++) {
			if (S.charAt(i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		}

		for (int i = 0; i < (N - 1) / 4; i++) {
			if (S.charAt(i) != S.charAt((N - 3) / 2 - i)
					|| S.charAt((N + 1) / 2 + i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		sc.close();
		int N = S.length();
		//S全体が回文であるかチェック
		for (int i = 0; i < (N - 1) / 2; i++) {
			if (S.charAt(i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		}

		for (int i = 0; i < (N - 1) / 4; i++) {
			if (S.charAt(i) != S.charAt((N - 3) / 2 - i)
					|| S.charAt((N + 1) / 2 + i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.nextLine(); S sc.nextLine() sc.nextLine sc sc.close() sc.close sc int N = S.length(); N S.length() S.length S for (int i = 0; i < (N - 1) / 2; i++) {
			if (S.charAt(i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		} 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)) {
				System.out.println("No");
				return;
			}
		} {
			if (S.charAt(i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		} if (S.charAt(i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			} 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 {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; for (int i = 0; i < (N - 1) / 4; i++) {
			if (S.charAt(i) != S.charAt((N - 3) / 2 - i)
					|| S.charAt((N + 1) / 2 + i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		} int i = 0; int i = 0; i 0 i < (N - 1) / 4 i (N - 1) / 4 (N - 1) N 1 4 i++ i++ i {
			if (S.charAt(i) != S.charAt((N - 3) / 2 - i)
					|| S.charAt((N + 1) / 2 + i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		} {
			if (S.charAt(i) != S.charAt((N - 3) / 2 - i)
					|| S.charAt((N + 1) / 2 + i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		} if (S.charAt(i) != S.charAt((N - 3) / 2 - i)
					|| S.charAt((N + 1) / 2 + i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			} S.charAt(i) != S.charAt((N - 3) / 2 - i)
					|| S.charAt((N + 1) / 2 + 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 + 1) / 2 + i) != S.charAt(N - 1 - i) S.charAt((N + 1) / 2 + i) S.charAt S (N + 1) / 2 + i (N + 1) / 2 (N + 1) N 1 2 i S.charAt(N - 1 - i) S.charAt S N - 1 - i N - 1 - i N 1 i {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		sc.close();
		int N = S.length();
		//S全体が回文であるかチェック
		for (int i = 0; i < (N - 1) / 2; i++) {
			if (S.charAt(i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		}

		for (int i = 0; i < (N - 1) / 4; i++) {
			if (S.charAt(i) != S.charAt((N - 3) / 2 - i)
					|| S.charAt((N + 1) / 2 + i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		sc.close();
		int N = S.length();
		//S全体が回文であるかチェック
		for (int i = 0; i < (N - 1) / 2; i++) {
			if (S.charAt(i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		}

		for (int i = 0; i < (N - 1) / 4; i++) {
			if (S.charAt(i) != S.charAt((N - 3) / 2 - i)
					|| S.charAt((N + 1) / 2 + i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		sc.close();
		int N = S.length();
		//S全体が回文であるかチェック
		for (int i = 0; i < (N - 1) / 2; i++) {
			if (S.charAt(i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		}

		for (int i = 0; i < (N - 1) / 4; i++) {
			if (S.charAt(i) != S.charAt((N - 3) / 2 - i)
					|| S.charAt((N + 1) / 2 + i) != S.charAt(N - 1 - i)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
}
