import java.util.*;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String S = keyboard.next();
		int L = (S.length()-1)/2;
		char[]s1 = new char[L];
		char[]s2 = new char[L];
		
		
		for(int i=0; i<S.length(); i++) {
			if(i < L) {
				s1[i] = S.charAt(i);
			}else if(i > L) {
				s2[i-L-1] = S.charAt(i);
			}
		}
		
		String ans = "No";
		
		for(int j=0; j<=L/2; j++) {
			if(s1[j]==s2[j]&& s1[L-1-j]==s2[L-1-j] && s1[j] == s1[L-1-j] && s2[j] == s2[L-1-j]) {
				ans = "Yes";
			}else {
				ans = "No";
				break;
			}
		}
		
		System.out.println(ans);
		keyboard.close();	
	}
}
 import java.util.*; util.* java public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String S = keyboard.next();
		int L = (S.length()-1)/2;
		char[]s1 = new char[L];
		char[]s2 = new char[L];
		
		
		for(int i=0; i<S.length(); i++) {
			if(i < L) {
				s1[i] = S.charAt(i);
			}else if(i > L) {
				s2[i-L-1] = S.charAt(i);
			}
		}
		
		String ans = "No";
		
		for(int j=0; j<=L/2; j++) {
			if(s1[j]==s2[j]&& s1[L-1-j]==s2[L-1-j] && s1[j] == s1[L-1-j] && s2[j] == s2[L-1-j]) {
				ans = "Yes";
			}else {
				ans = "No";
				break;
			}
		}
		
		System.out.println(ans);
		keyboard.close();	
	}
} Main public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String S = keyboard.next();
		int L = (S.length()-1)/2;
		char[]s1 = new char[L];
		char[]s2 = new char[L];
		
		
		for(int i=0; i<S.length(); i++) {
			if(i < L) {
				s1[i] = S.charAt(i);
			}else if(i > L) {
				s2[i-L-1] = S.charAt(i);
			}
		}
		
		String ans = "No";
		
		for(int j=0; j<=L/2; j++) {
			if(s1[j]==s2[j]&& s1[L-1-j]==s2[L-1-j] && s1[j] == s1[L-1-j] && s2[j] == s2[L-1-j]) {
				ans = "Yes";
			}else {
				ans = "No";
				break;
			}
		}
		
		System.out.println(ans);
		keyboard.close();	
	} main {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String S = keyboard.next();
		int L = (S.length()-1)/2;
		char[]s1 = new char[L];
		char[]s2 = new char[L];
		
		
		for(int i=0; i<S.length(); i++) {
			if(i < L) {
				s1[i] = S.charAt(i);
			}else if(i > L) {
				s2[i-L-1] = S.charAt(i);
			}
		}
		
		String ans = "No";
		
		for(int j=0; j<=L/2; j++) {
			if(s1[j]==s2[j]&& s1[L-1-j]==s2[L-1-j] && s1[j] == s1[L-1-j] && s2[j] == s2[L-1-j]) {
				ans = "Yes";
			}else {
				ans = "No";
				break;
			}
		}
		
		System.out.println(ans);
		keyboard.close();	
	} Scanner keyboard = new Scanner(System.in); keyboard new Scanner(System.in) String S = keyboard.next(); S keyboard.next() keyboard.next keyboard int L = (S.length()-1)/2; L (S.length()-1)/2 (S.length()-1) S.length() S.length S 1 2 char[]s1 = new char[L]; s1 new char[L] L char[]s2 = new char[L]; s2 new char[L] L for(int i=0; i<S.length(); i++) {
			if(i < L) {
				s1[i] = S.charAt(i);
			}else if(i > L) {
				s2[i-L-1] = S.charAt(i);
			}
		} int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
			if(i < L) {
				s1[i] = S.charAt(i);
			}else if(i > L) {
				s2[i-L-1] = S.charAt(i);
			}
		} {
			if(i < L) {
				s1[i] = S.charAt(i);
			}else if(i > L) {
				s2[i-L-1] = S.charAt(i);
			}
		} if(i < L) {
				s1[i] = S.charAt(i);
			}else if(i > L) {
				s2[i-L-1] = S.charAt(i);
			} i < L i L {
				s1[i] = S.charAt(i);
			} s1[i] = S.charAt(i) s1[i] s1 i S.charAt(i) S.charAt S i if(i > L) {
				s2[i-L-1] = S.charAt(i);
			} i > L i L {
				s2[i-L-1] = S.charAt(i);
			} s2[i-L-1] = S.charAt(i) s2[i-L-1] s2 i-L-1 i-L-1 i L 1 S.charAt(i) S.charAt S i String ans = "No"; ans "No" for(int j=0; j<=L/2; j++) {
			if(s1[j]==s2[j]&& s1[L-1-j]==s2[L-1-j] && s1[j] == s1[L-1-j] && s2[j] == s2[L-1-j]) {
				ans = "Yes";
			}else {
				ans = "No";
				break;
			}
		} int j=0; int j=0; j 0 j<=L/2 j L/2 L 2 j++ j++ j {
			if(s1[j]==s2[j]&& s1[L-1-j]==s2[L-1-j] && s1[j] == s1[L-1-j] && s2[j] == s2[L-1-j]) {
				ans = "Yes";
			}else {
				ans = "No";
				break;
			}
		} {
			if(s1[j]==s2[j]&& s1[L-1-j]==s2[L-1-j] && s1[j] == s1[L-1-j] && s2[j] == s2[L-1-j]) {
				ans = "Yes";
			}else {
				ans = "No";
				break;
			}
		} if(s1[j]==s2[j]&& s1[L-1-j]==s2[L-1-j] && s1[j] == s1[L-1-j] && s2[j] == s2[L-1-j]) {
				ans = "Yes";
			}else {
				ans = "No";
				break;
			} s1[j]==s2[j]&& s1[L-1-j]==s2[L-1-j] && s1[j] == s1[L-1-j] && s2[j] == s2[L-1-j] s1[j] == s1[L-1-j] s1[j]==s2[j]&& s1[L-1-j]==s2[L-1-j] && s1[j] == s1[L-1-j] && s2[j] == s2[L-1-j] s1[j]==s2[j] s1[j] s1 j s2[j] s2 j s1[L-1-j]==s2[L-1-j] s1[L-1-j] s1 L-1-j L-1-j L 1 j s2[L-1-j] s2 L-1-j L-1-j L 1 j s1[j] == s1[L-1-j] s1[j] s1 j s1[L-1-j] s1 L-1-j L-1-j L 1 j s2[j] == s2[L-1-j] s2[j] s2 j s2[L-1-j] s2 L-1-j L-1-j L 1 j {
				ans = "Yes";
			} ans = "Yes" ans "Yes" {
				ans = "No";
				break;
			} ans = "No" ans "No" break; System.out.println(ans) System.out.println System.out System System.out ans keyboard.close() keyboard.close keyboard String[] args args public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String S = keyboard.next();
		int L = (S.length()-1)/2;
		char[]s1 = new char[L];
		char[]s2 = new char[L];
		
		
		for(int i=0; i<S.length(); i++) {
			if(i < L) {
				s1[i] = S.charAt(i);
			}else if(i > L) {
				s2[i-L-1] = S.charAt(i);
			}
		}
		
		String ans = "No";
		
		for(int j=0; j<=L/2; j++) {
			if(s1[j]==s2[j]&& s1[L-1-j]==s2[L-1-j] && s1[j] == s1[L-1-j] && s2[j] == s2[L-1-j]) {
				ans = "Yes";
			}else {
				ans = "No";
				break;
			}
		}
		
		System.out.println(ans);
		keyboard.close();	
	}
} public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String S = keyboard.next();
		int L = (S.length()-1)/2;
		char[]s1 = new char[L];
		char[]s2 = new char[L];
		
		
		for(int i=0; i<S.length(); i++) {
			if(i < L) {
				s1[i] = S.charAt(i);
			}else if(i > L) {
				s2[i-L-1] = S.charAt(i);
			}
		}
		
		String ans = "No";
		
		for(int j=0; j<=L/2; j++) {
			if(s1[j]==s2[j]&& s1[L-1-j]==s2[L-1-j] && s1[j] == s1[L-1-j] && s2[j] == s2[L-1-j]) {
				ans = "Yes";
			}else {
				ans = "No";
				break;
			}
		}
		
		System.out.println(ans);
		keyboard.close();	
	}
} Main
import java.util.*;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String S = keyboard.next();
		int L = (S.length()-1)/2;
		char[]s1 = new char[L];
		char[]s2 = new char[L];
		
		
		for(int i=0; i<S.length(); i++) {
			if(i < L) {
				s1[i] = S.charAt(i);
			}else if(i > L) {
				s2[i-L-1] = S.charAt(i);
			}
		}
		
		String ans = "No";
		
		for(int j=0; j<=L/2; j++) {
			if(s1[j]==s2[j]&& s1[L-1-j]==s2[L-1-j] && s1[j] == s1[L-1-j] && s2[j] == s2[L-1-j]) {
				ans = "Yes";
			}else {
				ans = "No";
				break;
			}
		}
		
		System.out.println(ans);
		keyboard.close();	
	}
}

