//package atcoder;
 
import java.util.*;
 
public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		if(isPalindrom(S,0,S.length()-1)) {
			if(isPalindrom(S,0,(S.length()-2)/2)) {
				if(isPalindrom(S,(S.length()+2)/2,S.length()-1)) {
					System.out.println("Yes");
				}
			}else {
				System.out.println("No");
			}
		}else {
			System.out.println("No");
		}
		
	
	}
	public static boolean isPalindrom(String S,int minIdx,int maxIdx) {
//		int minIdx = 0;
//		int maxIdx = S.length()-1;
		while(minIdx<maxIdx) {
			if(S.charAt(minIdx++)!=S.charAt(maxIdx--)) {
				return false;
			}
		}
		return true;
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		if(isPalindrom(S,0,S.length()-1)) {
			if(isPalindrom(S,0,(S.length()-2)/2)) {
				if(isPalindrom(S,(S.length()+2)/2,S.length()-1)) {
					System.out.println("Yes");
				}
			}else {
				System.out.println("No");
			}
		}else {
			System.out.println("No");
		}
		
	
	}
	public static boolean isPalindrom(String S,int minIdx,int maxIdx) {
//		int minIdx = 0;
//		int maxIdx = S.length()-1;
		while(minIdx<maxIdx) {
			if(S.charAt(minIdx++)!=S.charAt(maxIdx--)) {
				return false;
			}
		}
		return true;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		if(isPalindrom(S,0,S.length()-1)) {
			if(isPalindrom(S,0,(S.length()-2)/2)) {
				if(isPalindrom(S,(S.length()+2)/2,S.length()-1)) {
					System.out.println("Yes");
				}
			}else {
				System.out.println("No");
			}
		}else {
			System.out.println("No");
		}
		
	
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		if(isPalindrom(S,0,S.length()-1)) {
			if(isPalindrom(S,0,(S.length()-2)/2)) {
				if(isPalindrom(S,(S.length()+2)/2,S.length()-1)) {
					System.out.println("Yes");
				}
			}else {
				System.out.println("No");
			}
		}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 if(isPalindrom(S,0,S.length()-1)) {
			if(isPalindrom(S,0,(S.length()-2)/2)) {
				if(isPalindrom(S,(S.length()+2)/2,S.length()-1)) {
					System.out.println("Yes");
				}
			}else {
				System.out.println("No");
			}
		}else {
			System.out.println("No");
		} isPalindrom(S,0,S.length()-1) isPalindrom S 0 S.length()-1 S.length() S.length S 1 {
			if(isPalindrom(S,0,(S.length()-2)/2)) {
				if(isPalindrom(S,(S.length()+2)/2,S.length()-1)) {
					System.out.println("Yes");
				}
			}else {
				System.out.println("No");
			}
		} if(isPalindrom(S,0,(S.length()-2)/2)) {
				if(isPalindrom(S,(S.length()+2)/2,S.length()-1)) {
					System.out.println("Yes");
				}
			}else {
				System.out.println("No");
			} isPalindrom(S,0,(S.length()-2)/2) isPalindrom S 0 (S.length()-2)/2 (S.length()-2) S.length() S.length S 2 2 {
				if(isPalindrom(S,(S.length()+2)/2,S.length()-1)) {
					System.out.println("Yes");
				}
			} if(isPalindrom(S,(S.length()+2)/2,S.length()-1)) {
					System.out.println("Yes");
				} isPalindrom(S,(S.length()+2)/2,S.length()-1) isPalindrom S (S.length()+2)/2 (S.length()+2) S.length() S.length S 2 2 S.length()-1 S.length() S.length S 1 {
					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" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args public static boolean isPalindrom(String S,int minIdx,int maxIdx) {
//		int minIdx = 0;
//		int maxIdx = S.length()-1;
		while(minIdx<maxIdx) {
			if(S.charAt(minIdx++)!=S.charAt(maxIdx--)) {
				return false;
			}
		}
		return true;
	} isPalindrom {
//		int minIdx = 0;
//		int maxIdx = S.length()-1;
		while(minIdx<maxIdx) {
			if(S.charAt(minIdx++)!=S.charAt(maxIdx--)) {
				return false;
			}
		}
		return true;
	} while(minIdx<maxIdx) {
			if(S.charAt(minIdx++)!=S.charAt(maxIdx--)) {
				return false;
			}
		} minIdx<maxIdx minIdx maxIdx {
			if(S.charAt(minIdx++)!=S.charAt(maxIdx--)) {
				return false;
			}
		} if(S.charAt(minIdx++)!=S.charAt(maxIdx--)) {
				return false;
			} S.charAt(minIdx++)!=S.charAt(maxIdx--) S.charAt(minIdx++) S.charAt S minIdx++ minIdx S.charAt(maxIdx--) S.charAt S maxIdx-- maxIdx {
				return false;
			} return false; false return true; true String S S int minIdx minIdx int maxIdx maxIdx public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		if(isPalindrom(S,0,S.length()-1)) {
			if(isPalindrom(S,0,(S.length()-2)/2)) {
				if(isPalindrom(S,(S.length()+2)/2,S.length()-1)) {
					System.out.println("Yes");
				}
			}else {
				System.out.println("No");
			}
		}else {
			System.out.println("No");
		}
		
	
	}
	public static boolean isPalindrom(String S,int minIdx,int maxIdx) {
//		int minIdx = 0;
//		int maxIdx = S.length()-1;
		while(minIdx<maxIdx) {
			if(S.charAt(minIdx++)!=S.charAt(maxIdx--)) {
				return false;
			}
		}
		return true;
	}
} public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		if(isPalindrom(S,0,S.length()-1)) {
			if(isPalindrom(S,0,(S.length()-2)/2)) {
				if(isPalindrom(S,(S.length()+2)/2,S.length()-1)) {
					System.out.println("Yes");
				}
			}else {
				System.out.println("No");
			}
		}else {
			System.out.println("No");
		}
		
	
	}
	public static boolean isPalindrom(String S,int minIdx,int maxIdx) {
//		int minIdx = 0;
//		int maxIdx = S.length()-1;
		while(minIdx<maxIdx) {
			if(S.charAt(minIdx++)!=S.charAt(maxIdx--)) {
				return false;
			}
		}
		return true;
	}
} Main
//package atcoder;
 
import java.util.*;
 
public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		if(isPalindrom(S,0,S.length()-1)) {
			if(isPalindrom(S,0,(S.length()-2)/2)) {
				if(isPalindrom(S,(S.length()+2)/2,S.length()-1)) {
					System.out.println("Yes");
				}
			}else {
				System.out.println("No");
			}
		}else {
			System.out.println("No");
		}
		
	
	}
	public static boolean isPalindrom(String S,int minIdx,int maxIdx) {
//		int minIdx = 0;
//		int maxIdx = S.length()-1;
		while(minIdx<maxIdx) {
			if(S.charAt(minIdx++)!=S.charAt(maxIdx--)) {
				return false;
			}
		}
		return true;
	}
}