import java.util.Scanner;

public class Main{
	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		char[] s  = scanner.nextLine().toCharArray();
		int n     = s.length;
		int mid   = (n - 1) / 2 + 1;
		String an = "Yes";

		for(int i = 0; i < mid; i++) {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		}

		int mmid = (mid - 1) / 2 + 1;
		int nn   = mid -1;
		for(int i = 0; i < mmid; i++) {

			if(s[i] != s[nn - i - 1]) {

				an = "No";
				break;
			}
		}

		int start = (n + 3) / 2 + n;
		int mmmid = start / 2 + 1;
		for(int i = start; i < mmmid; i++) {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		}
		System.out.println(an);

	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		char[] s  = scanner.nextLine().toCharArray();
		int n     = s.length;
		int mid   = (n - 1) / 2 + 1;
		String an = "Yes";

		for(int i = 0; i < mid; i++) {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		}

		int mmid = (mid - 1) / 2 + 1;
		int nn   = mid -1;
		for(int i = 0; i < mmid; i++) {

			if(s[i] != s[nn - i - 1]) {

				an = "No";
				break;
			}
		}

		int start = (n + 3) / 2 + n;
		int mmmid = start / 2 + 1;
		for(int i = start; i < mmmid; i++) {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		}
		System.out.println(an);

	}
} Main public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		char[] s  = scanner.nextLine().toCharArray();
		int n     = s.length;
		int mid   = (n - 1) / 2 + 1;
		String an = "Yes";

		for(int i = 0; i < mid; i++) {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		}

		int mmid = (mid - 1) / 2 + 1;
		int nn   = mid -1;
		for(int i = 0; i < mmid; i++) {

			if(s[i] != s[nn - i - 1]) {

				an = "No";
				break;
			}
		}

		int start = (n + 3) / 2 + n;
		int mmmid = start / 2 + 1;
		for(int i = start; i < mmmid; i++) {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		}
		System.out.println(an);

	} main {

		Scanner scanner = new Scanner(System.in);

		char[] s  = scanner.nextLine().toCharArray();
		int n     = s.length;
		int mid   = (n - 1) / 2 + 1;
		String an = "Yes";

		for(int i = 0; i < mid; i++) {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		}

		int mmid = (mid - 1) / 2 + 1;
		int nn   = mid -1;
		for(int i = 0; i < mmid; i++) {

			if(s[i] != s[nn - i - 1]) {

				an = "No";
				break;
			}
		}

		int start = (n + 3) / 2 + n;
		int mmmid = start / 2 + 1;
		for(int i = start; i < mmmid; i++) {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		}
		System.out.println(an);

	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) char[] s  = scanner.nextLine().toCharArray(); s scanner.nextLine().toCharArray() scanner.nextLine().toCharArray scanner.nextLine() scanner.nextLine scanner int n     = s.length; n s.length s s.length int mid   = (n - 1) / 2 + 1; mid (n - 1) / 2 + 1 (n - 1) / 2 (n - 1) n 1 2 1 String an = "Yes"; an "Yes" for(int i = 0; i < mid; i++) {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		} int i = 0; int i = 0; i 0 i < mid i mid i++ i++ i {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		} {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		} if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			} s[i] != s[n - i - 1] s[i] s i s[n - i - 1] s n - i - 1 n - i - 1 n i 1 {

				an = "No";
				break;
			} an = "No" an "No" break; int mmid = (mid - 1) / 2 + 1; mmid (mid - 1) / 2 + 1 (mid - 1) / 2 (mid - 1) mid 1 2 1 int nn   = mid -1; nn mid -1 mid 1 for(int i = 0; i < mmid; i++) {

			if(s[i] != s[nn - i - 1]) {

				an = "No";
				break;
			}
		} int i = 0; int i = 0; i 0 i < mmid i mmid i++ i++ i {

			if(s[i] != s[nn - i - 1]) {

				an = "No";
				break;
			}
		} {

			if(s[i] != s[nn - i - 1]) {

				an = "No";
				break;
			}
		} if(s[i] != s[nn - i - 1]) {

				an = "No";
				break;
			} s[i] != s[nn - i - 1] s[i] s i s[nn - i - 1] s nn - i - 1 nn - i - 1 nn i 1 {

				an = "No";
				break;
			} an = "No" an "No" break; int start = (n + 3) / 2 + n; start (n + 3) / 2 + n (n + 3) / 2 (n + 3) n 3 2 n int mmmid = start / 2 + 1; mmmid start / 2 + 1 start / 2 start 2 1 for(int i = start; i < mmmid; i++) {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		} int i = start; int i = start; i start i < mmmid i mmmid i++ i++ i {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		} {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		} if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			} s[i] != s[n - i - 1] s[i] s i s[n - i - 1] s n - i - 1 n - i - 1 n i 1 {

				an = "No";
				break;
			} an = "No" an "No" break; System.out.println(an) System.out.println System.out System System.out an String[] args args public class Main{
	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		char[] s  = scanner.nextLine().toCharArray();
		int n     = s.length;
		int mid   = (n - 1) / 2 + 1;
		String an = "Yes";

		for(int i = 0; i < mid; i++) {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		}

		int mmid = (mid - 1) / 2 + 1;
		int nn   = mid -1;
		for(int i = 0; i < mmid; i++) {

			if(s[i] != s[nn - i - 1]) {

				an = "No";
				break;
			}
		}

		int start = (n + 3) / 2 + n;
		int mmmid = start / 2 + 1;
		for(int i = start; i < mmmid; i++) {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		}
		System.out.println(an);

	}
} public class Main{
	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		char[] s  = scanner.nextLine().toCharArray();
		int n     = s.length;
		int mid   = (n - 1) / 2 + 1;
		String an = "Yes";

		for(int i = 0; i < mid; i++) {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		}

		int mmid = (mid - 1) / 2 + 1;
		int nn   = mid -1;
		for(int i = 0; i < mmid; i++) {

			if(s[i] != s[nn - i - 1]) {

				an = "No";
				break;
			}
		}

		int start = (n + 3) / 2 + n;
		int mmmid = start / 2 + 1;
		for(int i = start; i < mmmid; i++) {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		}
		System.out.println(an);

	}
} Main
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		char[] s  = scanner.nextLine().toCharArray();
		int n     = s.length;
		int mid   = (n - 1) / 2 + 1;
		String an = "Yes";

		for(int i = 0; i < mid; i++) {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		}

		int mmid = (mid - 1) / 2 + 1;
		int nn   = mid -1;
		for(int i = 0; i < mmid; i++) {

			if(s[i] != s[nn - i - 1]) {

				an = "No";
				break;
			}
		}

		int start = (n + 3) / 2 + n;
		int mmmid = start / 2 + 1;
		for(int i = start; i < mmmid; i++) {

			if(s[i] != s[n - i - 1]) {

				an = "No";
				break;
			}
		}
		System.out.println(an);

	}
}