import java.util.*;
class Main {

	public static Boolean process(String s) {
		int i = 0, j = s.length() - 1;
		while(i < j) {
			if(s.charAt(i) != s.charAt(j)) {
				return false;
			}
			i++;
			j--;
		}
		return true;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int n = s.length();
		String s1 = s.substring(0, ((n-1)/2));
		String s2 = s.substring((n+3)/2 - 1, n);

		if(process(s) && process(s1) && process(s2)) {
			System.out.println("Yes");	
		}
		else {
			System.out.println("No");
		}
	}
} import java.util.*; util.* java class Main {

	public static Boolean process(String s) {
		int i = 0, j = s.length() - 1;
		while(i < j) {
			if(s.charAt(i) != s.charAt(j)) {
				return false;
			}
			i++;
			j--;
		}
		return true;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int n = s.length();
		String s1 = s.substring(0, ((n-1)/2));
		String s2 = s.substring((n+3)/2 - 1, n);

		if(process(s) && process(s1) && process(s2)) {
			System.out.println("Yes");	
		}
		else {
			System.out.println("No");
		}
	}
} Main public static Boolean process(String s) {
		int i = 0, j = s.length() - 1;
		while(i < j) {
			if(s.charAt(i) != s.charAt(j)) {
				return false;
			}
			i++;
			j--;
		}
		return true;
	} process {
		int i = 0, j = s.length() - 1;
		while(i < j) {
			if(s.charAt(i) != s.charAt(j)) {
				return false;
			}
			i++;
			j--;
		}
		return true;
	} int i = 0 i 0 j = s.length() - 1; j s.length() - 1 s.length() s.length s 1 while(i < j) {
			if(s.charAt(i) != s.charAt(j)) {
				return false;
			}
			i++;
			j--;
		} i < j i j {
			if(s.charAt(i) != s.charAt(j)) {
				return false;
			}
			i++;
			j--;
		} if(s.charAt(i) != s.charAt(j)) {
				return false;
			} s.charAt(i) != s.charAt(j) s.charAt(i) s.charAt s i s.charAt(j) s.charAt s j {
				return false;
			} return false; false i++ i j-- j return true; true String s s public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int n = s.length();
		String s1 = s.substring(0, ((n-1)/2));
		String s2 = s.substring((n+3)/2 - 1, n);

		if(process(s) && process(s1) && process(s2)) {
			System.out.println("Yes");	
		}
		else {
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int n = s.length();
		String s1 = s.substring(0, ((n-1)/2));
		String s2 = s.substring((n+3)/2 - 1, n);

		if(process(s) && process(s1) && process(s2)) {
			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 int n = s.length(); n s.length() s.length s String s1 = s.substring(0, ((n-1)/2)); s1 s.substring(0, ((n-1)/2)) s.substring s 0 ((n-1)/2) (n-1) n 1 2 String s2 = s.substring((n+3)/2 - 1, n); s2 s.substring((n+3)/2 - 1, n) s.substring s (n+3)/2 - 1 (n+3)/2 (n+3) n 3 2 1 n if(process(s) && process(s1) && process(s2)) {
			System.out.println("Yes");	
		}
		else {
			System.out.println("No");
		} process(s) && process(s1) && process(s2) process(s) && process(s1) && process(s2) process(s) process s process(s1) process s1 process(s2) process s2 {
			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
import java.util.*;
class Main {

	public static Boolean process(String s) {
		int i = 0, j = s.length() - 1;
		while(i < j) {
			if(s.charAt(i) != s.charAt(j)) {
				return false;
			}
			i++;
			j--;
		}
		return true;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int n = s.length();
		String s1 = s.substring(0, ((n-1)/2));
		String s2 = s.substring((n+3)/2 - 1, n);

		if(process(s) && process(s1) && process(s2)) {
			System.out.println("Yes");	
		}
		else {
			System.out.println("No");
		}
	}
}