import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		String S = sc.next();
		int N = S.length();
		
		String firstHalf = S.substring(0, (N-1)/2);
		String secondHalf = S.substring((N+3)/2 - 1);
		
		// 結果の出力
		if (isPalindrome(S) && isPalindrome(firstHalf) && isPalindrome(secondHalf)) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}		

		sc.close();
	}
	
	static boolean isPalindrome (String s) {
		int n = s.length();
		for (int i=0; i<n/2; i++) {
			if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
		}
		return true;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		String S = sc.next();
		int N = S.length();
		
		String firstHalf = S.substring(0, (N-1)/2);
		String secondHalf = S.substring((N+3)/2 - 1);
		
		// 結果の出力
		if (isPalindrome(S) && isPalindrome(firstHalf) && isPalindrome(secondHalf)) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}		

		sc.close();
	}
	
	static boolean isPalindrome (String s) {
		int n = s.length();
		for (int i=0; i<n/2; i++) {
			if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
		}
		return true;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		String S = sc.next();
		int N = S.length();
		
		String firstHalf = S.substring(0, (N-1)/2);
		String secondHalf = S.substring((N+3)/2 - 1);
		
		// 結果の出力
		if (isPalindrome(S) && isPalindrome(firstHalf) && isPalindrome(secondHalf)) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}		

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		String S = sc.next();
		int N = S.length();
		
		String firstHalf = S.substring(0, (N-1)/2);
		String secondHalf = S.substring((N+3)/2 - 1);
		
		// 結果の出力
		if (isPalindrome(S) && isPalindrome(firstHalf) && isPalindrome(secondHalf)) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}		

		sc.close();
	} 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 firstHalf = S.substring(0, (N-1)/2); firstHalf S.substring(0, (N-1)/2) S.substring S 0 (N-1)/2 (N-1) N 1 2 String secondHalf = S.substring((N+3)/2 - 1); secondHalf S.substring((N+3)/2 - 1) S.substring S (N+3)/2 - 1 (N+3)/2 (N+3) N 3 2 1 if (isPalindrome(S) && isPalindrome(firstHalf) && isPalindrome(secondHalf)) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		} isPalindrome(S) && isPalindrome(firstHalf) && isPalindrome(secondHalf) isPalindrome(S) && isPalindrome(firstHalf) && isPalindrome(secondHalf) isPalindrome(S) isPalindrome S isPalindrome(firstHalf) isPalindrome firstHalf isPalindrome(secondHalf) isPalindrome secondHalf {
			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" sc.close() sc.close sc String[] args args static boolean isPalindrome (String s) {
		int n = s.length();
		for (int i=0; i<n/2; i++) {
			if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
		}
		return true;
	} isPalindrome {
		int n = s.length();
		for (int i=0; i<n/2; i++) {
			if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
		}
		return true;
	} int n = s.length(); n s.length() s.length s for (int i=0; i<n/2; i++) {
			if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
		} int i=0; int i=0; i 0 i<n/2 i n/2 n 2 i++ i++ i {
			if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
		} {
			if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
		} if (s.charAt(i)!=s.charAt(n-i-1)) {return false;} s.charAt(i)!=s.charAt(n-i-1) s.charAt(i) s.charAt s i s.charAt(n-i-1) s.charAt s n-i-1 n-i-1 n i 1 {return false;} return false; false return true; true String s s public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		String S = sc.next();
		int N = S.length();
		
		String firstHalf = S.substring(0, (N-1)/2);
		String secondHalf = S.substring((N+3)/2 - 1);
		
		// 結果の出力
		if (isPalindrome(S) && isPalindrome(firstHalf) && isPalindrome(secondHalf)) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}		

		sc.close();
	}
	
	static boolean isPalindrome (String s) {
		int n = s.length();
		for (int i=0; i<n/2; i++) {
			if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
		}
		return true;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		String S = sc.next();
		int N = S.length();
		
		String firstHalf = S.substring(0, (N-1)/2);
		String secondHalf = S.substring((N+3)/2 - 1);
		
		// 結果の出力
		if (isPalindrome(S) && isPalindrome(firstHalf) && isPalindrome(secondHalf)) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}		

		sc.close();
	}
	
	static boolean isPalindrome (String s) {
		int n = s.length();
		for (int i=0; i<n/2; i++) {
			if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
		}
		return true;
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		String S = sc.next();
		int N = S.length();
		
		String firstHalf = S.substring(0, (N-1)/2);
		String secondHalf = S.substring((N+3)/2 - 1);
		
		// 結果の出力
		if (isPalindrome(S) && isPalindrome(firstHalf) && isPalindrome(secondHalf)) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}		

		sc.close();
	}
	
	static boolean isPalindrome (String s) {
		int n = s.length();
		for (int i=0; i<n/2; i++) {
			if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
		}
		return true;
	}
}
