import java.util.Scanner;
public class Main {

	@SuppressWarnings("resource")
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		String S=sc.next();
		String[] S2=S.split("");
		int N=S2.length;
		for(int i=0;i<N/2;i++) {
			if(!S2[0+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}
		}
		for(int i=0;i<((N-1)/2)-1;i++) {
			if(!S2[0+i].equals(S2[(N-1)/2-1-i])||!S2[(N+3)/2-1+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}

	}System.out.println("Yes");
		}
} import java.util.Scanner; Scanner java.util public class Main {

	@SuppressWarnings("resource")
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		String S=sc.next();
		String[] S2=S.split("");
		int N=S2.length;
		for(int i=0;i<N/2;i++) {
			if(!S2[0+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}
		}
		for(int i=0;i<((N-1)/2)-1;i++) {
			if(!S2[0+i].equals(S2[(N-1)/2-1-i])||!S2[(N+3)/2-1+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}

	}System.out.println("Yes");
		}
} Main @SuppressWarnings("resource")
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		String S=sc.next();
		String[] S2=S.split("");
		int N=S2.length;
		for(int i=0;i<N/2;i++) {
			if(!S2[0+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}
		}
		for(int i=0;i<((N-1)/2)-1;i++) {
			if(!S2[0+i].equals(S2[(N-1)/2-1-i])||!S2[(N+3)/2-1+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}

	}System.out.println("Yes");
		} main {
		Scanner sc=new Scanner(System.in);
		String S=sc.next();
		String[] S2=S.split("");
		int N=S2.length;
		for(int i=0;i<N/2;i++) {
			if(!S2[0+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}
		}
		for(int i=0;i<((N-1)/2)-1;i++) {
			if(!S2[0+i].equals(S2[(N-1)/2-1-i])||!S2[(N+3)/2-1+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}

	}System.out.println("Yes");
		} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String S=sc.next(); S sc.next() sc.next sc String[] S2=S.split(""); S2 S.split("") S.split S "" int N=S2.length; N S2.length S2 S2.length for(int i=0;i<N/2;i++) {
			if(!S2[0+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}
		} int i=0; int i=0; i 0 i<N/2 i N/2 N 2 i++ i++ i {
			if(!S2[0+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}
		} {
			if(!S2[0+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}
		} if(!S2[0+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);} !S2[0+i].equals(S2[N-1-i]) S2[0+i].equals(S2[N-1-i]) S2[0+i].equals S2[0+i] S2 0+i 0 i S2[N-1-i] S2 N-1-i N-1-i N 1 i {
				System.out.println("No");
				System.exit(0);} System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 for(int i=0;i<((N-1)/2)-1;i++) {
			if(!S2[0+i].equals(S2[(N-1)/2-1-i])||!S2[(N+3)/2-1+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}

	} int i=0; int i=0; i 0 i<((N-1)/2)-1 i ((N-1)/2)-1 ((N-1)/2) (N-1) N 1 2 1 i++ i++ i {
			if(!S2[0+i].equals(S2[(N-1)/2-1-i])||!S2[(N+3)/2-1+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}

	} {
			if(!S2[0+i].equals(S2[(N-1)/2-1-i])||!S2[(N+3)/2-1+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}

	} if(!S2[0+i].equals(S2[(N-1)/2-1-i])||!S2[(N+3)/2-1+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);} !S2[0+i].equals(S2[(N-1)/2-1-i])||!S2[(N+3)/2-1+i].equals(S2[N-1-i]) !S2[0+i].equals(S2[(N-1)/2-1-i]) S2[0+i].equals(S2[(N-1)/2-1-i]) S2[0+i].equals S2[0+i] S2 0+i 0 i S2[(N-1)/2-1-i] S2 (N-1)/2-1-i (N-1)/2-1-i (N-1)/2 (N-1) N 1 2 1 i !S2[(N+3)/2-1+i].equals(S2[N-1-i]) S2[(N+3)/2-1+i].equals(S2[N-1-i]) S2[(N+3)/2-1+i].equals S2[(N+3)/2-1+i] S2 (N+3)/2-1+i (N+3)/2-1 (N+3)/2 (N+3) N 3 2 1 i S2[N-1-i] S2 N-1-i N-1-i N 1 i {
				System.out.println("No");
				System.exit(0);} System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {

	@SuppressWarnings("resource")
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		String S=sc.next();
		String[] S2=S.split("");
		int N=S2.length;
		for(int i=0;i<N/2;i++) {
			if(!S2[0+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}
		}
		for(int i=0;i<((N-1)/2)-1;i++) {
			if(!S2[0+i].equals(S2[(N-1)/2-1-i])||!S2[(N+3)/2-1+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}

	}System.out.println("Yes");
		}
} public class Main {

	@SuppressWarnings("resource")
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		String S=sc.next();
		String[] S2=S.split("");
		int N=S2.length;
		for(int i=0;i<N/2;i++) {
			if(!S2[0+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}
		}
		for(int i=0;i<((N-1)/2)-1;i++) {
			if(!S2[0+i].equals(S2[(N-1)/2-1-i])||!S2[(N+3)/2-1+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}

	}System.out.println("Yes");
		}
} Main
import java.util.Scanner;
public class Main {

	@SuppressWarnings("resource")
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		String S=sc.next();
		String[] S2=S.split("");
		int N=S2.length;
		for(int i=0;i<N/2;i++) {
			if(!S2[0+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}
		}
		for(int i=0;i<((N-1)/2)-1;i++) {
			if(!S2[0+i].equals(S2[(N-1)/2-1-i])||!S2[(N+3)/2-1+i].equals(S2[N-1-i])) {
				System.out.println("No");
				System.exit(0);}

	}System.out.println("Yes");
		}
}
