import java.util.Scanner;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		char[] c = line.toCharArray();
		String ans = "Yes";
		int n = c.length;
		for(int i = 0; i < n; i++){
			if(c[i] != c[(n - 1) - i]){
				ans = "No";
			}
		}
		for(int i = 0; i < (n/2); i++){
			if(c[i] != c[((n - 1)/2 - 1) - i]){
				ans = "No";
			}
			if(c[(n + 1)/2 + i] != c[(n - 1) - i]){
				ans = "No";
			}
		}
		System.out.println(ans);
 	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		char[] c = line.toCharArray();
		String ans = "Yes";
		int n = c.length;
		for(int i = 0; i < n; i++){
			if(c[i] != c[(n - 1) - i]){
				ans = "No";
			}
		}
		for(int i = 0; i < (n/2); i++){
			if(c[i] != c[((n - 1)/2 - 1) - i]){
				ans = "No";
			}
			if(c[(n + 1)/2 + i] != c[(n - 1) - i]){
				ans = "No";
			}
		}
		System.out.println(ans);
 	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		char[] c = line.toCharArray();
		String ans = "Yes";
		int n = c.length;
		for(int i = 0; i < n; i++){
			if(c[i] != c[(n - 1) - i]){
				ans = "No";
			}
		}
		for(int i = 0; i < (n/2); i++){
			if(c[i] != c[((n - 1)/2 - 1) - i]){
				ans = "No";
			}
			if(c[(n + 1)/2 + i] != c[(n - 1) - i]){
				ans = "No";
			}
		}
		System.out.println(ans);
 	} main {
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		char[] c = line.toCharArray();
		String ans = "Yes";
		int n = c.length;
		for(int i = 0; i < n; i++){
			if(c[i] != c[(n - 1) - i]){
				ans = "No";
			}
		}
		for(int i = 0; i < (n/2); i++){
			if(c[i] != c[((n - 1)/2 - 1) - i]){
				ans = "No";
			}
			if(c[(n + 1)/2 + i] != c[(n - 1) - i]){
				ans = "No";
			}
		}
		System.out.println(ans);
 	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc char[] c = line.toCharArray(); c line.toCharArray() line.toCharArray line String ans = "Yes"; ans "Yes" int n = c.length; n c.length c c.length for(int i = 0; i < n; i++){
			if(c[i] != c[(n - 1) - i]){
				ans = "No";
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			if(c[i] != c[(n - 1) - i]){
				ans = "No";
			}
		} {
			if(c[i] != c[(n - 1) - i]){
				ans = "No";
			}
		} if(c[i] != c[(n - 1) - i]){
				ans = "No";
			} c[i] != c[(n - 1) - i] c[i] c i c[(n - 1) - i] c (n - 1) - i (n - 1) n 1 i {
				ans = "No";
			} ans = "No" ans "No" for(int i = 0; i < (n/2); i++){
			if(c[i] != c[((n - 1)/2 - 1) - i]){
				ans = "No";
			}
			if(c[(n + 1)/2 + i] != c[(n - 1) - i]){
				ans = "No";
			}
		} int i = 0; int i = 0; i 0 i < (n/2) i (n/2) n 2 i++ i++ i {
			if(c[i] != c[((n - 1)/2 - 1) - i]){
				ans = "No";
			}
			if(c[(n + 1)/2 + i] != c[(n - 1) - i]){
				ans = "No";
			}
		} {
			if(c[i] != c[((n - 1)/2 - 1) - i]){
				ans = "No";
			}
			if(c[(n + 1)/2 + i] != c[(n - 1) - i]){
				ans = "No";
			}
		} if(c[i] != c[((n - 1)/2 - 1) - i]){
				ans = "No";
			} c[i] != c[((n - 1)/2 - 1) - i] c[i] c i c[((n - 1)/2 - 1) - i] c ((n - 1)/2 - 1) - i ((n - 1)/2 - 1) (n - 1)/2 (n - 1) n 1 2 1 i {
				ans = "No";
			} ans = "No" ans "No" if(c[(n + 1)/2 + i] != c[(n - 1) - i]){
				ans = "No";
			} c[(n + 1)/2 + i] != c[(n - 1) - i] c[(n + 1)/2 + i] c (n + 1)/2 + i (n + 1)/2 (n + 1) n 1 2 i c[(n - 1) - i] c (n - 1) - i (n - 1) n 1 i {
				ans = "No";
			} ans = "No" ans "No" System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.Scanner;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		char[] c = line.toCharArray();
		String ans = "Yes";
		int n = c.length;
		for(int i = 0; i < n; i++){
			if(c[i] != c[(n - 1) - i]){
				ans = "No";
			}
		}
		for(int i = 0; i < (n/2); i++){
			if(c[i] != c[((n - 1)/2 - 1) - i]){
				ans = "No";
			}
			if(c[(n + 1)/2 + i] != c[(n - 1) - i]){
				ans = "No";
			}
		}
		System.out.println(ans);
 	}
}