
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		char[] str = sc.next().toCharArray();
		
		int n = str.length;
		
		for(int i = 0; i < n/2; i++) {
//			System.out.println(str[i] +" "+ str[(n - 1)/2 - i - 1] +" " + str[i + (n + 1)/2] +" "+ str[n - 1 - i]);
			if((str[i] != str[n - 1 - i]) ||
					(str[i] != str[(n - 1)/2 - i - 1]) ||
					(str[i + (n + 1)/2] != str[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) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		char[] str = sc.next().toCharArray();
		
		int n = str.length;
		
		for(int i = 0; i < n/2; i++) {
//			System.out.println(str[i] +" "+ str[(n - 1)/2 - i - 1] +" " + str[i + (n + 1)/2] +" "+ str[n - 1 - i]);
			if((str[i] != str[n - 1 - i]) ||
					(str[i] != str[(n - 1)/2 - i - 1]) ||
					(str[i + (n + 1)/2] != str[n - 1 - i])){
				System.out.println("No");
				return;
			}
		}
		
		System.out.println("Yes");
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		char[] str = sc.next().toCharArray();
		
		int n = str.length;
		
		for(int i = 0; i < n/2; i++) {
//			System.out.println(str[i] +" "+ str[(n - 1)/2 - i - 1] +" " + str[i + (n + 1)/2] +" "+ str[n - 1 - i]);
			if((str[i] != str[n - 1 - i]) ||
					(str[i] != str[(n - 1)/2 - i - 1]) ||
					(str[i + (n + 1)/2] != str[n - 1 - i])){
				System.out.println("No");
				return;
			}
		}
		
		System.out.println("Yes");
	} main {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		char[] str = sc.next().toCharArray();
		
		int n = str.length;
		
		for(int i = 0; i < n/2; i++) {
//			System.out.println(str[i] +" "+ str[(n - 1)/2 - i - 1] +" " + str[i + (n + 1)/2] +" "+ str[n - 1 - i]);
			if((str[i] != str[n - 1 - i]) ||
					(str[i] != str[(n - 1)/2 - i - 1]) ||
					(str[i + (n + 1)/2] != str[n - 1 - i])){
				System.out.println("No");
				return;
			}
		}
		
		System.out.println("Yes");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] str = sc.next().toCharArray(); str sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc int n = str.length; n str.length str str.length for(int i = 0; i < n/2; i++) {
//			System.out.println(str[i] +" "+ str[(n - 1)/2 - i - 1] +" " + str[i + (n + 1)/2] +" "+ str[n - 1 - i]);
			if((str[i] != str[n - 1 - i]) ||
					(str[i] != str[(n - 1)/2 - i - 1]) ||
					(str[i + (n + 1)/2] != str[n - 1 - i])){
				System.out.println("No");
				return;
			}
		} int i = 0; int i = 0; i 0 i < n/2 i n/2 n 2 i++ i++ i {
//			System.out.println(str[i] +" "+ str[(n - 1)/2 - i - 1] +" " + str[i + (n + 1)/2] +" "+ str[n - 1 - i]);
			if((str[i] != str[n - 1 - i]) ||
					(str[i] != str[(n - 1)/2 - i - 1]) ||
					(str[i + (n + 1)/2] != str[n - 1 - i])){
				System.out.println("No");
				return;
			}
		} {
//			System.out.println(str[i] +" "+ str[(n - 1)/2 - i - 1] +" " + str[i + (n + 1)/2] +" "+ str[n - 1 - i]);
			if((str[i] != str[n - 1 - i]) ||
					(str[i] != str[(n - 1)/2 - i - 1]) ||
					(str[i + (n + 1)/2] != str[n - 1 - i])){
				System.out.println("No");
				return;
			}
		} if((str[i] != str[n - 1 - i]) ||
					(str[i] != str[(n - 1)/2 - i - 1]) ||
					(str[i + (n + 1)/2] != str[n - 1 - i])){
				System.out.println("No");
				return;
			} (str[i] != str[n - 1 - i]) ||
					(str[i] != str[(n - 1)/2 - i - 1]) ||
					(str[i + (n + 1)/2] != str[n - 1 - i]) (str[i] != str[n - 1 - i]) ||
					(str[i] != str[(n - 1)/2 - i - 1]) ||
					(str[i + (n + 1)/2] != str[n - 1 - i]) (str[i] != str[n - 1 - i]) str[i] str i str[n - 1 - i] str n - 1 - i n - 1 - i n 1 i (str[i] != str[(n - 1)/2 - i - 1]) str[i] str i str[(n - 1)/2 - i - 1] str (n - 1)/2 - i - 1 (n - 1)/2 - i - 1 (n - 1)/2 (n - 1) n 1 2 i 1 (str[i + (n + 1)/2] != str[n - 1 - i]) str[i + (n + 1)/2] str i + (n + 1)/2 i (n + 1)/2 (n + 1) n 1 2 str[n - 1 - i] str 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) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		char[] str = sc.next().toCharArray();
		
		int n = str.length;
		
		for(int i = 0; i < n/2; i++) {
//			System.out.println(str[i] +" "+ str[(n - 1)/2 - i - 1] +" " + str[i + (n + 1)/2] +" "+ str[n - 1 - i]);
			if((str[i] != str[n - 1 - i]) ||
					(str[i] != str[(n - 1)/2 - i - 1]) ||
					(str[i + (n + 1)/2] != str[n - 1 - i])){
				System.out.println("No");
				return;
			}
		}
		
		System.out.println("Yes");
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		char[] str = sc.next().toCharArray();
		
		int n = str.length;
		
		for(int i = 0; i < n/2; i++) {
//			System.out.println(str[i] +" "+ str[(n - 1)/2 - i - 1] +" " + str[i + (n + 1)/2] +" "+ str[n - 1 - i]);
			if((str[i] != str[n - 1 - i]) ||
					(str[i] != str[(n - 1)/2 - i - 1]) ||
					(str[i + (n + 1)/2] != str[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) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		char[] str = sc.next().toCharArray();
		
		int n = str.length;
		
		for(int i = 0; i < n/2; i++) {
//			System.out.println(str[i] +" "+ str[(n - 1)/2 - i - 1] +" " + str[i + (n + 1)/2] +" "+ str[n - 1 - i]);
			if((str[i] != str[n - 1 - i]) ||
					(str[i] != str[(n - 1)/2 - i - 1]) ||
					(str[i + (n + 1)/2] != str[n - 1 - i])){
				System.out.println("No");
				return;
			}
		}
		
		System.out.println("Yes");
	}

}
