import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
        String b = "Yes";
        int c = a.length();
        for(int i=0;i<(c-1)/2;i++){if(a.charAt(i) == a.charAt(c-1-i) && a.charAt(i) == a.charAt((c-1)/2-1-i)){ }
                                  else{b = "No";break;}
                                  }
		System.out.println(b);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
        String b = "Yes";
        int c = a.length();
        for(int i=0;i<(c-1)/2;i++){if(a.charAt(i) == a.charAt(c-1-i) && a.charAt(i) == a.charAt((c-1)/2-1-i)){ }
                                  else{b = "No";break;}
                                  }
		System.out.println(b);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
        String b = "Yes";
        int c = a.length();
        for(int i=0;i<(c-1)/2;i++){if(a.charAt(i) == a.charAt(c-1-i) && a.charAt(i) == a.charAt((c-1)/2-1-i)){ }
                                  else{b = "No";break;}
                                  }
		System.out.println(b);
	} main {
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
        String b = "Yes";
        int c = a.length();
        for(int i=0;i<(c-1)/2;i++){if(a.charAt(i) == a.charAt(c-1-i) && a.charAt(i) == a.charAt((c-1)/2-1-i)){ }
                                  else{b = "No";break;}
                                  }
		System.out.println(b);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc String b = "Yes"; b "Yes" int c = a.length(); c a.length() a.length a for(int i=0;i<(c-1)/2;i++){if(a.charAt(i) == a.charAt(c-1-i) && a.charAt(i) == a.charAt((c-1)/2-1-i)){ }
                                  else{b = "No";break;}
                                  } int i=0; int i=0; i 0 i<(c-1)/2 i (c-1)/2 (c-1) c 1 2 i++ i++ i {if(a.charAt(i) == a.charAt(c-1-i) && a.charAt(i) == a.charAt((c-1)/2-1-i)){ }
                                  else{b = "No";break;}
                                  } {if(a.charAt(i) == a.charAt(c-1-i) && a.charAt(i) == a.charAt((c-1)/2-1-i)){ }
                                  else{b = "No";break;}
                                  } if(a.charAt(i) == a.charAt(c-1-i) && a.charAt(i) == a.charAt((c-1)/2-1-i)){ }
                                  else{b = "No";break;} a.charAt(i) == a.charAt(c-1-i) && a.charAt(i) == a.charAt((c-1)/2-1-i) a.charAt(i) == a.charAt(c-1-i) a.charAt(i) a.charAt a i a.charAt(c-1-i) a.charAt a c-1-i c-1-i c 1 i a.charAt(i) == a.charAt((c-1)/2-1-i) a.charAt(i) a.charAt a i a.charAt((c-1)/2-1-i) a.charAt a (c-1)/2-1-i (c-1)/2-1-i (c-1)/2 (c-1) c 1 2 1 i { } {b = "No";break;} b = "No" b "No" break; System.out.println(b) System.out.println System.out System System.out b String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
        String b = "Yes";
        int c = a.length();
        for(int i=0;i<(c-1)/2;i++){if(a.charAt(i) == a.charAt(c-1-i) && a.charAt(i) == a.charAt((c-1)/2-1-i)){ }
                                  else{b = "No";break;}
                                  }
		System.out.println(b);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
        String b = "Yes";
        int c = a.length();
        for(int i=0;i<(c-1)/2;i++){if(a.charAt(i) == a.charAt(c-1-i) && a.charAt(i) == a.charAt((c-1)/2-1-i)){ }
                                  else{b = "No";break;}
                                  }
		System.out.println(b);
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
        String b = "Yes";
        int c = a.length();
        for(int i=0;i<(c-1)/2;i++){if(a.charAt(i) == a.charAt(c-1-i) && a.charAt(i) == a.charAt((c-1)/2-1-i)){ }
                                  else{b = "No";break;}
                                  }
		System.out.println(b);
	}
}
