import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String l1 = scan.nextLine();
		scan.close();

		String S = l1;
		int N = S.length();

		String source = S;
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		source = S.substring(0, (N - 1) / 2);
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		source = S.substring(((N + 3) / 2) - 1, N);
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		System.out.println("Yes");
	}

	static boolean judge(String source) {
		char[] cArray = source.toCharArray();

		boolean result = true;

		for (int i = 0; i < ((cArray.length + 1) / 2); i++) {
			char a = cArray[i];
			char b = cArray[cArray.length - 1 - i];
			if (a != b) {
				result = false;
				break;
			}
		}

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String l1 = scan.nextLine();
		scan.close();

		String S = l1;
		int N = S.length();

		String source = S;
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		source = S.substring(0, (N - 1) / 2);
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		source = S.substring(((N + 3) / 2) - 1, N);
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		System.out.println("Yes");
	}

	static boolean judge(String source) {
		char[] cArray = source.toCharArray();

		boolean result = true;

		for (int i = 0; i < ((cArray.length + 1) / 2); i++) {
			char a = cArray[i];
			char b = cArray[cArray.length - 1 - i];
			if (a != b) {
				result = false;
				break;
			}
		}

		return result;
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String l1 = scan.nextLine();
		scan.close();

		String S = l1;
		int N = S.length();

		String source = S;
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		source = S.substring(0, (N - 1) / 2);
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		source = S.substring(((N + 3) / 2) - 1, N);
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		System.out.println("Yes");
	} main {
		Scanner scan = new Scanner(System.in);
		String l1 = scan.nextLine();
		scan.close();

		String S = l1;
		int N = S.length();

		String source = S;
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		source = S.substring(0, (N - 1) / 2);
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		source = S.substring(((N + 3) / 2) - 1, N);
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		System.out.println("Yes");
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String l1 = scan.nextLine(); l1 scan.nextLine() scan.nextLine scan scan.close() scan.close scan String S = l1; S l1 int N = S.length(); N S.length() S.length S String source = S; source S if (!judge(source)) {
			System.out.println("No");
			return;
		} !judge(source) judge(source) judge source {
			System.out.println("No");
			return;
		} System.out.println("No") System.out.println System.out System System.out "No" return; source = S.substring(0, (N - 1) / 2) source S.substring(0, (N - 1) / 2) S.substring S 0 (N - 1) / 2 (N - 1) N 1 2 if (!judge(source)) {
			System.out.println("No");
			return;
		} !judge(source) judge(source) judge source {
			System.out.println("No");
			return;
		} System.out.println("No") System.out.println System.out System System.out "No" return; source = S.substring(((N + 3) / 2) - 1, N) source S.substring(((N + 3) / 2) - 1, N) S.substring S ((N + 3) / 2) - 1 ((N + 3) / 2) (N + 3) N 3 2 1 N if (!judge(source)) {
			System.out.println("No");
			return;
		} !judge(source) judge(source) judge source {
			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 static boolean judge(String source) {
		char[] cArray = source.toCharArray();

		boolean result = true;

		for (int i = 0; i < ((cArray.length + 1) / 2); i++) {
			char a = cArray[i];
			char b = cArray[cArray.length - 1 - i];
			if (a != b) {
				result = false;
				break;
			}
		}

		return result;
	} judge {
		char[] cArray = source.toCharArray();

		boolean result = true;

		for (int i = 0; i < ((cArray.length + 1) / 2); i++) {
			char a = cArray[i];
			char b = cArray[cArray.length - 1 - i];
			if (a != b) {
				result = false;
				break;
			}
		}

		return result;
	} char[] cArray = source.toCharArray(); cArray source.toCharArray() source.toCharArray source boolean result = true; result true for (int i = 0; i < ((cArray.length + 1) / 2); i++) {
			char a = cArray[i];
			char b = cArray[cArray.length - 1 - i];
			if (a != b) {
				result = false;
				break;
			}
		} int i = 0; int i = 0; i 0 i < ((cArray.length + 1) / 2) i ((cArray.length + 1) / 2) (cArray.length + 1) cArray.length cArray cArray.length 1 2 i++ i++ i {
			char a = cArray[i];
			char b = cArray[cArray.length - 1 - i];
			if (a != b) {
				result = false;
				break;
			}
		} {
			char a = cArray[i];
			char b = cArray[cArray.length - 1 - i];
			if (a != b) {
				result = false;
				break;
			}
		} char a = cArray[i]; a cArray[i] cArray i char b = cArray[cArray.length - 1 - i]; b cArray[cArray.length - 1 - i] cArray cArray.length - 1 - i cArray.length - 1 - i cArray.length cArray cArray.length 1 i if (a != b) {
				result = false;
				break;
			} a != b a b {
				result = false;
				break;
			} result = false result false break; return result; result String source source public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String l1 = scan.nextLine();
		scan.close();

		String S = l1;
		int N = S.length();

		String source = S;
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		source = S.substring(0, (N - 1) / 2);
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		source = S.substring(((N + 3) / 2) - 1, N);
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		System.out.println("Yes");
	}

	static boolean judge(String source) {
		char[] cArray = source.toCharArray();

		boolean result = true;

		for (int i = 0; i < ((cArray.length + 1) / 2); i++) {
			char a = cArray[i];
			char b = cArray[cArray.length - 1 - i];
			if (a != b) {
				result = false;
				break;
			}
		}

		return result;
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String l1 = scan.nextLine();
		scan.close();

		String S = l1;
		int N = S.length();

		String source = S;
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		source = S.substring(0, (N - 1) / 2);
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		source = S.substring(((N + 3) / 2) - 1, N);
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		System.out.println("Yes");
	}

	static boolean judge(String source) {
		char[] cArray = source.toCharArray();

		boolean result = true;

		for (int i = 0; i < ((cArray.length + 1) / 2); i++) {
			char a = cArray[i];
			char b = cArray[cArray.length - 1 - i];
			if (a != b) {
				result = false;
				break;
			}
		}

		return result;
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String l1 = scan.nextLine();
		scan.close();

		String S = l1;
		int N = S.length();

		String source = S;
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		source = S.substring(0, (N - 1) / 2);
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		source = S.substring(((N + 3) / 2) - 1, N);
		if (!judge(source)) {
			System.out.println("No");
			return;
		}

		System.out.println("Yes");
	}

	static boolean judge(String source) {
		char[] cArray = source.toCharArray();

		boolean result = true;

		for (int i = 0; i < ((cArray.length + 1) / 2); i++) {
			char a = cArray[i];
			char b = cArray[cArray.length - 1 - i];
			if (a != b) {
				result = false;
				break;
			}
		}

		return result;
	}
}