import java.util.Scanner;

public class Main{
	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		char[] s  = scanner.nextLine().toCharArray();
		int n     = s.length;
		int mid   = (n - 1) / 2 + 1;
		String an = "Yes";

		for(int i = 0; i < mid; i++) {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		}

		int mmid = (mid - 1) / 2 + 1;
		int nn   = mid -1;
		for(int i = 0; i < mmid; i++) {

			if(s[i] != s[nn - i - 1]) {

				an = "No";
				break;
			}
		}

		int start = (n + 3) / 2 + n;
		int mmmid = start / 2 + 1;
		for(int i = start; i < mmmid; i++) {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		}
		System.out.println(an);

	}
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz