import java.util.*;
public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		StringBuffer S_temp =new StringBuffer(S);
		String S_r = new String(S_temp.reverse());
		int N = S.length();
		StringBuffer s1_temp = new StringBuffer(S.substring(0, (N - 1) / 2));
		String s1 = new String(s1_temp);
		String  s1_r = new String(s1_temp.reverse());
		StringBuffer s2_temp = new StringBuffer(S.subSequence((N + 3) / 2 - 1, N));
		String s2 = new String(s2_temp);
		String  s2_r = new String(s2_temp.reverse());
		if(S.equals(S_r) && s1.equals(s1_r) && s2.equals(s2_r)){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} import java.util.*; util.* java public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		StringBuffer S_temp =new StringBuffer(S);
		String S_r = new String(S_temp.reverse());
		int N = S.length();
		StringBuffer s1_temp = new StringBuffer(S.substring(0, (N - 1) / 2));
		String s1 = new String(s1_temp);
		String  s1_r = new String(s1_temp.reverse());
		StringBuffer s2_temp = new StringBuffer(S.subSequence((N + 3) / 2 - 1, N));
		String s2 = new String(s2_temp);
		String  s2_r = new String(s2_temp.reverse());
		if(S.equals(S_r) && s1.equals(s1_r) && s2.equals(s2_r)){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		StringBuffer S_temp =new StringBuffer(S);
		String S_r = new String(S_temp.reverse());
		int N = S.length();
		StringBuffer s1_temp = new StringBuffer(S.substring(0, (N - 1) / 2));
		String s1 = new String(s1_temp);
		String  s1_r = new String(s1_temp.reverse());
		StringBuffer s2_temp = new StringBuffer(S.subSequence((N + 3) / 2 - 1, N));
		String s2 = new String(s2_temp);
		String  s2_r = new String(s2_temp.reverse());
		if(S.equals(S_r) && s1.equals(s1_r) && s2.equals(s2_r)){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		StringBuffer S_temp =new StringBuffer(S);
		String S_r = new String(S_temp.reverse());
		int N = S.length();
		StringBuffer s1_temp = new StringBuffer(S.substring(0, (N - 1) / 2));
		String s1 = new String(s1_temp);
		String  s1_r = new String(s1_temp.reverse());
		StringBuffer s2_temp = new StringBuffer(S.subSequence((N + 3) / 2 - 1, N));
		String s2 = new String(s2_temp);
		String  s2_r = new String(s2_temp.reverse());
		if(S.equals(S_r) && s1.equals(s1_r) && s2.equals(s2_r)){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc StringBuffer S_temp =new StringBuffer(S); S_temp new StringBuffer(S) String S_r = new String(S_temp.reverse()); S_r new String(S_temp.reverse()) int N = S.length(); N S.length() S.length S StringBuffer s1_temp = new StringBuffer(S.substring(0, (N - 1) / 2)); s1_temp new StringBuffer(S.substring(0, (N - 1) / 2)) String s1 = new String(s1_temp); s1 new String(s1_temp) String  s1_r = new String(s1_temp.reverse()); s1_r new String(s1_temp.reverse()) StringBuffer s2_temp = new StringBuffer(S.subSequence((N + 3) / 2 - 1, N)); s2_temp new StringBuffer(S.subSequence((N + 3) / 2 - 1, N)) String s2 = new String(s2_temp); s2 new String(s2_temp) String  s2_r = new String(s2_temp.reverse()); s2_r new String(s2_temp.reverse()) if(S.equals(S_r) && s1.equals(s1_r) && s2.equals(s2_r)){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} S.equals(S_r) && s1.equals(s1_r) && s2.equals(s2_r) S.equals(S_r) && s1.equals(s1_r) && s2.equals(s2_r) S.equals(S_r) S.equals S S_r s1.equals(s1_r) s1.equals s1 s1_r s2.equals(s2_r) s2.equals s2 s2_r {
			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" String args[] args public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		StringBuffer S_temp =new StringBuffer(S);
		String S_r = new String(S_temp.reverse());
		int N = S.length();
		StringBuffer s1_temp = new StringBuffer(S.substring(0, (N - 1) / 2));
		String s1 = new String(s1_temp);
		String  s1_r = new String(s1_temp.reverse());
		StringBuffer s2_temp = new StringBuffer(S.subSequence((N + 3) / 2 - 1, N));
		String s2 = new String(s2_temp);
		String  s2_r = new String(s2_temp.reverse());
		if(S.equals(S_r) && s1.equals(s1_r) && s2.equals(s2_r)){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		StringBuffer S_temp =new StringBuffer(S);
		String S_r = new String(S_temp.reverse());
		int N = S.length();
		StringBuffer s1_temp = new StringBuffer(S.substring(0, (N - 1) / 2));
		String s1 = new String(s1_temp);
		String  s1_r = new String(s1_temp.reverse());
		StringBuffer s2_temp = new StringBuffer(S.subSequence((N + 3) / 2 - 1, N));
		String s2 = new String(s2_temp);
		String  s2_r = new String(s2_temp.reverse());
		if(S.equals(S_r) && s1.equals(s1_r) && s2.equals(s2_r)){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main
import java.util.*;
public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		StringBuffer S_temp =new StringBuffer(S);
		String S_r = new String(S_temp.reverse());
		int N = S.length();
		StringBuffer s1_temp = new StringBuffer(S.substring(0, (N - 1) / 2));
		String s1 = new String(s1_temp);
		String  s1_r = new String(s1_temp.reverse());
		StringBuffer s2_temp = new StringBuffer(S.subSequence((N + 3) / 2 - 1, N));
		String s2 = new String(s2_temp);
		String  s2_r = new String(s2_temp.reverse());
		if(S.equals(S_r) && s1.equals(s1_r) && s2.equals(s2_r)){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}
