import java.io.InputStream;
import java.io.PrintStream;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	boolean f(String s, int st, int ed) {
		for (; st < ed; st++, ed--) {
			if (s.charAt(st - 1) != s.charAt(ed - 1)) {
				return false;
			}
		}
		return true;
	}

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		String S = sc.next();

		sc.close();

		int N = S.length();
		if (f(S, 1, N) && f(S, 1, (N - 1) / 2) && f(S, (N + 3) / 2, N)) {
			out.println("Yes");
		} else {
			out.println("No");
		}

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}
} import java.io.InputStream; InputStream java.io import java.io.PrintStream; PrintStream java.io import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	boolean f(String s, int st, int ed) {
		for (; st < ed; st++, ed--) {
			if (s.charAt(st - 1) != s.charAt(ed - 1)) {
				return false;
			}
		}
		return true;
	}

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		String S = sc.next();

		sc.close();

		int N = S.length();
		if (f(S, 1, N) && f(S, 1, (N - 1) / 2) && f(S, (N + 3) / 2, N)) {
			out.println("Yes");
		} else {
			out.println("No");
		}

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}
} Main InputStream in = System.in; in System.in System System.in PrintStream out = System.out; out System.out System System.out boolean f(String s, int st, int ed) {
		for (; st < ed; st++, ed--) {
			if (s.charAt(st - 1) != s.charAt(ed - 1)) {
				return false;
			}
		}
		return true;
	} f {
		for (; st < ed; st++, ed--) {
			if (s.charAt(st - 1) != s.charAt(ed - 1)) {
				return false;
			}
		}
		return true;
	} for (; st < ed; st++, ed--) {
			if (s.charAt(st - 1) != s.charAt(ed - 1)) {
				return false;
			}
		} ; st < ed st ed st++, ed-- st++ st ed-- ed {
			if (s.charAt(st - 1) != s.charAt(ed - 1)) {
				return false;
			}
		} {
			if (s.charAt(st - 1) != s.charAt(ed - 1)) {
				return false;
			}
		} if (s.charAt(st - 1) != s.charAt(ed - 1)) {
				return false;
			} s.charAt(st - 1) != s.charAt(ed - 1) s.charAt(st - 1) s.charAt s st - 1 st 1 s.charAt(ed - 1) s.charAt s ed - 1 ed 1 {
				return false;
			} return false; false return true; true String s s int st st int ed ed public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		String S = sc.next();

		sc.close();

		int N = S.length();
		if (f(S, 1, N) && f(S, 1, (N - 1) / 2) && f(S, (N + 3) / 2, N)) {
			out.println("Yes");
		} else {
			out.println("No");
		}

	} _main {
		Scanner sc = new Scanner(in);

		String S = sc.next();

		sc.close();

		int N = S.length();
		if (f(S, 1, N) && f(S, 1, (N - 1) / 2) && f(S, (N + 3) / 2, N)) {
			out.println("Yes");
		} else {
			out.println("No");
		}

	} Scanner sc = new Scanner(in); sc new Scanner(in) String S = sc.next(); S sc.next() sc.next sc sc.close() sc.close sc int N = S.length(); N S.length() S.length S if (f(S, 1, N) && f(S, 1, (N - 1) / 2) && f(S, (N + 3) / 2, N)) {
			out.println("Yes");
		} else {
			out.println("No");
		} f(S, 1, N) && f(S, 1, (N - 1) / 2) && f(S, (N + 3) / 2, N) f(S, 1, N) && f(S, 1, (N - 1) / 2) && f(S, (N + 3) / 2, N) f(S, 1, N) f S 1 N f(S, 1, (N - 1) / 2) f S 1 (N - 1) / 2 (N - 1) N 1 2 f(S, (N + 3) / 2, N) f S (N + 3) / 2 (N + 3) N 3 2 N {
			out.println("Yes");
		} out.println("Yes") out.println out "Yes" {
			out.println("No");
		} out.println("No") out.println out "No" String[] args args public static void main(String[] args) {
		new Main()._main(args);
	} main {
		new Main()._main(args);
	} new Main()._main(args) new Main()._main new Main() args String[] args args public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	boolean f(String s, int st, int ed) {
		for (; st < ed; st++, ed--) {
			if (s.charAt(st - 1) != s.charAt(ed - 1)) {
				return false;
			}
		}
		return true;
	}

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		String S = sc.next();

		sc.close();

		int N = S.length();
		if (f(S, 1, N) && f(S, 1, (N - 1) / 2) && f(S, (N + 3) / 2, N)) {
			out.println("Yes");
		} else {
			out.println("No");
		}

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}
} public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	boolean f(String s, int st, int ed) {
		for (; st < ed; st++, ed--) {
			if (s.charAt(st - 1) != s.charAt(ed - 1)) {
				return false;
			}
		}
		return true;
	}

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		String S = sc.next();

		sc.close();

		int N = S.length();
		if (f(S, 1, N) && f(S, 1, (N - 1) / 2) && f(S, (N + 3) / 2, N)) {
			out.println("Yes");
		} else {
			out.println("No");
		}

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}
} Main
import java.io.InputStream;
import java.io.PrintStream;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	boolean f(String s, int st, int ed) {
		for (; st < ed; st++, ed--) {
			if (s.charAt(st - 1) != s.charAt(ed - 1)) {
				return false;
			}
		}
		return true;
	}

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		String S = sc.next();

		sc.close();

		int N = S.length();
		if (f(S, 1, N) && f(S, 1, (N - 1) / 2) && f(S, (N + 3) / 2, N)) {
			out.println("Yes");
		} else {
			out.println("No");
		}

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}
}
