import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		int n = s.length();
		if((is_Palindrome(s, n))){
			int n1 = (n - 1)/ 2;
			int n2 = (n + 3)/ 2 - 1;
			String s1 = s.substring(0,n1);
			String s2 = s.substring(n2, n);
			//System.out.println(s1);
			//System.out.println(s2);
			if(is_Palindrome(s1, n1)){
				if(is_Palindrome(s2, n1)){
					System.out.println("Yes");
				}
				else{
				System.out.println("No");
			}
		}else{
			System.out.println("No");
			}
		}
		else{
			System.out.println("No");
		}
		
	}
	
	public static boolean is_Palindrome(String s, int n){
		boolean flag = true;
		if(n % 2 != 0){
			int n3 = (n - 1)/ 2;
			int i = 0;
			while(i < n3){
				if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				}
				i++;
			}
		}
		else{
			int n3 = (n - 1)/ 2 + 1;
			int i = 0;
			while(i < n3){
				if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				}
				i++;
			}
		}
		return flag;
	}
	
	} import java.util.*; util.* java class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		int n = s.length();
		if((is_Palindrome(s, n))){
			int n1 = (n - 1)/ 2;
			int n2 = (n + 3)/ 2 - 1;
			String s1 = s.substring(0,n1);
			String s2 = s.substring(n2, n);
			//System.out.println(s1);
			//System.out.println(s2);
			if(is_Palindrome(s1, n1)){
				if(is_Palindrome(s2, n1)){
					System.out.println("Yes");
				}
				else{
				System.out.println("No");
			}
		}else{
			System.out.println("No");
			}
		}
		else{
			System.out.println("No");
		}
		
	}
	
	public static boolean is_Palindrome(String s, int n){
		boolean flag = true;
		if(n % 2 != 0){
			int n3 = (n - 1)/ 2;
			int i = 0;
			while(i < n3){
				if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				}
				i++;
			}
		}
		else{
			int n3 = (n - 1)/ 2 + 1;
			int i = 0;
			while(i < n3){
				if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				}
				i++;
			}
		}
		return flag;
	}
	
	} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		int n = s.length();
		if((is_Palindrome(s, n))){
			int n1 = (n - 1)/ 2;
			int n2 = (n + 3)/ 2 - 1;
			String s1 = s.substring(0,n1);
			String s2 = s.substring(n2, n);
			//System.out.println(s1);
			//System.out.println(s2);
			if(is_Palindrome(s1, n1)){
				if(is_Palindrome(s2, n1)){
					System.out.println("Yes");
				}
				else{
				System.out.println("No");
			}
		}else{
			System.out.println("No");
			}
		}
		else{
			System.out.println("No");
		}
		
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		int n = s.length();
		if((is_Palindrome(s, n))){
			int n1 = (n - 1)/ 2;
			int n2 = (n + 3)/ 2 - 1;
			String s1 = s.substring(0,n1);
			String s2 = s.substring(n2, n);
			//System.out.println(s1);
			//System.out.println(s2);
			if(is_Palindrome(s1, n1)){
				if(is_Palindrome(s2, n1)){
					System.out.println("Yes");
				}
				else{
				System.out.println("No");
			}
		}else{
			System.out.println("No");
			}
		}
		else{
			System.out.println("No");
		}
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc int n = s.length(); n s.length() s.length s if((is_Palindrome(s, n))){
			int n1 = (n - 1)/ 2;
			int n2 = (n + 3)/ 2 - 1;
			String s1 = s.substring(0,n1);
			String s2 = s.substring(n2, n);
			//System.out.println(s1);
			//System.out.println(s2);
			if(is_Palindrome(s1, n1)){
				if(is_Palindrome(s2, n1)){
					System.out.println("Yes");
				}
				else{
				System.out.println("No");
			}
		}else{
			System.out.println("No");
			}
		}
		else{
			System.out.println("No");
		} (is_Palindrome(s, n)) is_Palindrome s n {
			int n1 = (n - 1)/ 2;
			int n2 = (n + 3)/ 2 - 1;
			String s1 = s.substring(0,n1);
			String s2 = s.substring(n2, n);
			//System.out.println(s1);
			//System.out.println(s2);
			if(is_Palindrome(s1, n1)){
				if(is_Palindrome(s2, n1)){
					System.out.println("Yes");
				}
				else{
				System.out.println("No");
			}
		}else{
			System.out.println("No");
			}
		} int n1 = (n - 1)/ 2; n1 (n - 1)/ 2 (n - 1) n 1 2 int n2 = (n + 3)/ 2 - 1; n2 (n + 3)/ 2 - 1 (n + 3)/ 2 (n + 3) n 3 2 1 String s1 = s.substring(0,n1); s1 s.substring(0,n1) s.substring s 0 n1 String s2 = s.substring(n2, n); s2 s.substring(n2, n) s.substring s n2 n if(is_Palindrome(s1, n1)){
				if(is_Palindrome(s2, n1)){
					System.out.println("Yes");
				}
				else{
				System.out.println("No");
			}
		}else{
			System.out.println("No");
			} is_Palindrome(s1, n1) is_Palindrome s1 n1 {
				if(is_Palindrome(s2, n1)){
					System.out.println("Yes");
				}
				else{
				System.out.println("No");
			}
		} if(is_Palindrome(s2, n1)){
					System.out.println("Yes");
				}
				else{
				System.out.println("No");
			} is_Palindrome(s2, n1) is_Palindrome s2 n1 {
					System.out.println("Yes");
				} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
				System.out.println("No");
			} System.out.println("No") System.out.println System.out System System.out "No" {
			System.out.println("No");
			} System.out.println("No") System.out.println System.out System System.out "No" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args public static boolean is_Palindrome(String s, int n){
		boolean flag = true;
		if(n % 2 != 0){
			int n3 = (n - 1)/ 2;
			int i = 0;
			while(i < n3){
				if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				}
				i++;
			}
		}
		else{
			int n3 = (n - 1)/ 2 + 1;
			int i = 0;
			while(i < n3){
				if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				}
				i++;
			}
		}
		return flag;
	} is_Palindrome {
		boolean flag = true;
		if(n % 2 != 0){
			int n3 = (n - 1)/ 2;
			int i = 0;
			while(i < n3){
				if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				}
				i++;
			}
		}
		else{
			int n3 = (n - 1)/ 2 + 1;
			int i = 0;
			while(i < n3){
				if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				}
				i++;
			}
		}
		return flag;
	} boolean flag = true; flag true if(n % 2 != 0){
			int n3 = (n - 1)/ 2;
			int i = 0;
			while(i < n3){
				if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				}
				i++;
			}
		}
		else{
			int n3 = (n - 1)/ 2 + 1;
			int i = 0;
			while(i < n3){
				if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				}
				i++;
			}
		} n % 2 != 0 n % 2 n 2 0 {
			int n3 = (n - 1)/ 2;
			int i = 0;
			while(i < n3){
				if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				}
				i++;
			}
		} int n3 = (n - 1)/ 2; n3 (n - 1)/ 2 (n - 1) n 1 2 int i = 0; i 0 while(i < n3){
				if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				}
				i++;
			} i < n3 i n3 {
				if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				}
				i++;
			} if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				} s.charAt(i) != s.charAt(n - i - 1) s.charAt(i) s.charAt s i s.charAt(n - i - 1) s.charAt s n - i - 1 n - i - 1 n i 1 {
					flag = false;
					break;
				} flag = false flag false break; i++ i {
			int n3 = (n - 1)/ 2 + 1;
			int i = 0;
			while(i < n3){
				if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				}
				i++;
			}
		} int n3 = (n - 1)/ 2 + 1; n3 (n - 1)/ 2 + 1 (n - 1)/ 2 (n - 1) n 1 2 1 int i = 0; i 0 while(i < n3){
				if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				}
				i++;
			} i < n3 i n3 {
				if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				}
				i++;
			} if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				} s.charAt(i) != s.charAt(n - i - 1) s.charAt(i) s.charAt s i s.charAt(n - i - 1) s.charAt s n - i - 1 n - i - 1 n i 1 {
					flag = false;
					break;
				} flag = false flag false break; i++ i return flag; flag String s s int n n
import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		int n = s.length();
		if((is_Palindrome(s, n))){
			int n1 = (n - 1)/ 2;
			int n2 = (n + 3)/ 2 - 1;
			String s1 = s.substring(0,n1);
			String s2 = s.substring(n2, n);
			//System.out.println(s1);
			//System.out.println(s2);
			if(is_Palindrome(s1, n1)){
				if(is_Palindrome(s2, n1)){
					System.out.println("Yes");
				}
				else{
				System.out.println("No");
			}
		}else{
			System.out.println("No");
			}
		}
		else{
			System.out.println("No");
		}
		
	}
	
	public static boolean is_Palindrome(String s, int n){
		boolean flag = true;
		if(n % 2 != 0){
			int n3 = (n - 1)/ 2;
			int i = 0;
			while(i < n3){
				if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				}
				i++;
			}
		}
		else{
			int n3 = (n - 1)/ 2 + 1;
			int i = 0;
			while(i < n3){
				if(s.charAt(i) != s.charAt(n - i - 1)){
					flag = false;
					break;
				}
				i++;
			}
		}
		return flag;
	}
	
	}