import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String S = in.readLine();
		int N = S.length();
		char[] s = new char[N];
		boolean wrongS = false;

		for (int i = 0; i < N; i++) {
			s[i] = S.charAt(i);
		}

		for (int i = 0; i < (N - 1)/2; i++) {
			if (s[i] != s[N-1 - i]) {
				wrongS = true;
				break;
			}
		}

		if (wrongS) {
			System.out.println("No");
			return;
		}

		for (int i = 0; i < (N + 1) / 4; i++) {
			if (s[i] != s[N/2 -1 - i]) {
				wrongS = true;
				break;
			}

		}

		if (wrongS) {
			System.out.println("No");
			return;
		}
		System.out.println("Yes");

	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String S = in.readLine();
		int N = S.length();
		char[] s = new char[N];
		boolean wrongS = false;

		for (int i = 0; i < N; i++) {
			s[i] = S.charAt(i);
		}

		for (int i = 0; i < (N - 1)/2; i++) {
			if (s[i] != s[N-1 - i]) {
				wrongS = true;
				break;
			}
		}

		if (wrongS) {
			System.out.println("No");
			return;
		}

		for (int i = 0; i < (N + 1) / 4; i++) {
			if (s[i] != s[N/2 -1 - i]) {
				wrongS = true;
				break;
			}

		}

		if (wrongS) {
			System.out.println("No");
			return;
		}
		System.out.println("Yes");

	}

} Main public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String S = in.readLine();
		int N = S.length();
		char[] s = new char[N];
		boolean wrongS = false;

		for (int i = 0; i < N; i++) {
			s[i] = S.charAt(i);
		}

		for (int i = 0; i < (N - 1)/2; i++) {
			if (s[i] != s[N-1 - i]) {
				wrongS = true;
				break;
			}
		}

		if (wrongS) {
			System.out.println("No");
			return;
		}

		for (int i = 0; i < (N + 1) / 4; i++) {
			if (s[i] != s[N/2 -1 - i]) {
				wrongS = true;
				break;
			}

		}

		if (wrongS) {
			System.out.println("No");
			return;
		}
		System.out.println("Yes");

	} main {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String S = in.readLine();
		int N = S.length();
		char[] s = new char[N];
		boolean wrongS = false;

		for (int i = 0; i < N; i++) {
			s[i] = S.charAt(i);
		}

		for (int i = 0; i < (N - 1)/2; i++) {
			if (s[i] != s[N-1 - i]) {
				wrongS = true;
				break;
			}
		}

		if (wrongS) {
			System.out.println("No");
			return;
		}

		for (int i = 0; i < (N + 1) / 4; i++) {
			if (s[i] != s[N/2 -1 - i]) {
				wrongS = true;
				break;
			}

		}

		if (wrongS) {
			System.out.println("No");
			return;
		}
		System.out.println("Yes");

	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String S = in.readLine(); S in.readLine() in.readLine in int N = S.length(); N S.length() S.length S char[] s = new char[N]; s new char[N] N boolean wrongS = false; wrongS false for (int i = 0; i < N; i++) {
			s[i] = S.charAt(i);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			s[i] = S.charAt(i);
		} {
			s[i] = S.charAt(i);
		} s[i] = S.charAt(i) s[i] s i S.charAt(i) S.charAt S i for (int i = 0; i < (N - 1)/2; i++) {
			if (s[i] != s[N-1 - i]) {
				wrongS = true;
				break;
			}
		} int i = 0; int i = 0; i 0 i < (N - 1)/2 i (N - 1)/2 (N - 1) N 1 2 i++ i++ i {
			if (s[i] != s[N-1 - i]) {
				wrongS = true;
				break;
			}
		} {
			if (s[i] != s[N-1 - i]) {
				wrongS = true;
				break;
			}
		} if (s[i] != s[N-1 - i]) {
				wrongS = true;
				break;
			} s[i] != s[N-1 - i] s[i] s i s[N-1 - i] s N-1 - i N-1 - i N 1 i {
				wrongS = true;
				break;
			} wrongS = true wrongS true break; if (wrongS) {
			System.out.println("No");
			return;
		} wrongS {
			System.out.println("No");
			return;
		} System.out.println("No") System.out.println System.out System System.out "No" return; for (int i = 0; i < (N + 1) / 4; i++) {
			if (s[i] != s[N/2 -1 - i]) {
				wrongS = true;
				break;
			}

		} int i = 0; int i = 0; i 0 i < (N + 1) / 4 i (N + 1) / 4 (N + 1) N 1 4 i++ i++ i {
			if (s[i] != s[N/2 -1 - i]) {
				wrongS = true;
				break;
			}

		} {
			if (s[i] != s[N/2 -1 - i]) {
				wrongS = true;
				break;
			}

		} if (s[i] != s[N/2 -1 - i]) {
				wrongS = true;
				break;
			} s[i] != s[N/2 -1 - i] s[i] s i s[N/2 -1 - i] s N/2 -1 - i N/2 -1 - i N/2 N 2 1 i {
				wrongS = true;
				break;
			} wrongS = true wrongS true break; if (wrongS) {
			System.out.println("No");
			return;
		} wrongS {
			System.out.println("No");
			return;
		} System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String S = in.readLine();
		int N = S.length();
		char[] s = new char[N];
		boolean wrongS = false;

		for (int i = 0; i < N; i++) {
			s[i] = S.charAt(i);
		}

		for (int i = 0; i < (N - 1)/2; i++) {
			if (s[i] != s[N-1 - i]) {
				wrongS = true;
				break;
			}
		}

		if (wrongS) {
			System.out.println("No");
			return;
		}

		for (int i = 0; i < (N + 1) / 4; i++) {
			if (s[i] != s[N/2 -1 - i]) {
				wrongS = true;
				break;
			}

		}

		if (wrongS) {
			System.out.println("No");
			return;
		}
		System.out.println("Yes");

	}

} public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String S = in.readLine();
		int N = S.length();
		char[] s = new char[N];
		boolean wrongS = false;

		for (int i = 0; i < N; i++) {
			s[i] = S.charAt(i);
		}

		for (int i = 0; i < (N - 1)/2; i++) {
			if (s[i] != s[N-1 - i]) {
				wrongS = true;
				break;
			}
		}

		if (wrongS) {
			System.out.println("No");
			return;
		}

		for (int i = 0; i < (N + 1) / 4; i++) {
			if (s[i] != s[N/2 -1 - i]) {
				wrongS = true;
				break;
			}

		}

		if (wrongS) {
			System.out.println("No");
			return;
		}
		System.out.println("Yes");

	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String S = in.readLine();
		int N = S.length();
		char[] s = new char[N];
		boolean wrongS = false;

		for (int i = 0; i < N; i++) {
			s[i] = S.charAt(i);
		}

		for (int i = 0; i < (N - 1)/2; i++) {
			if (s[i] != s[N-1 - i]) {
				wrongS = true;
				break;
			}
		}

		if (wrongS) {
			System.out.println("No");
			return;
		}

		for (int i = 0; i < (N + 1) / 4; i++) {
			if (s[i] != s[N/2 -1 - i]) {
				wrongS = true;
				break;
			}

		}

		if (wrongS) {
			System.out.println("No");
			return;
		}
		System.out.println("Yes");

	}

}
