import java.util.*;
import java.io.*;

public class Main {
	static PrintWriter out;
	static StringBuilder sb;
	static long mod = 998244353;
	static int inf = (int) 1e15;
	static ArrayList<Integer>[] ad;
	static int n, k;
	static long[][] memo;
	static char[][] g;
	static boolean[] vis;
	static long ans, tem;
	static long[] a;

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		out = new PrintWriter(System.out);
		String s = sc.nextLine();
		String s1 = s.substring(0, s.length() / 2);
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		s1 = s.substring(((s.length() + 3) / 2)-1, s.length());
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		s1 = s.substring(0,s.length());
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		System.out.println("Yes");
		out.close();
	}

	static long cal(int i, int u, int p) {
		if (memo[i][u] != -1)
			return memo[i][u];
		long ans = 1;
		for (int v : ad[i]) {
			if (v == p)
				continue;
			if (u == 0) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + 2 * cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else if (u == 1) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else {
				long tem = 0;
				tem = cal(v, 0, i) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			}
		}
		return memo[i][u] = ans;
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public int[] nextArrInt(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public long[] nextArrLong(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
	static PrintWriter out;
	static StringBuilder sb;
	static long mod = 998244353;
	static int inf = (int) 1e15;
	static ArrayList<Integer>[] ad;
	static int n, k;
	static long[][] memo;
	static char[][] g;
	static boolean[] vis;
	static long ans, tem;
	static long[] a;

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		out = new PrintWriter(System.out);
		String s = sc.nextLine();
		String s1 = s.substring(0, s.length() / 2);
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		s1 = s.substring(((s.length() + 3) / 2)-1, s.length());
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		s1 = s.substring(0,s.length());
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		System.out.println("Yes");
		out.close();
	}

	static long cal(int i, int u, int p) {
		if (memo[i][u] != -1)
			return memo[i][u];
		long ans = 1;
		for (int v : ad[i]) {
			if (v == p)
				continue;
			if (u == 0) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + 2 * cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else if (u == 1) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else {
				long tem = 0;
				tem = cal(v, 0, i) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			}
		}
		return memo[i][u] = ans;
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public int[] nextArrInt(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public long[] nextArrLong(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
} Main static PrintWriter out; out static StringBuilder sb; sb static long mod = 998244353; mod 998244353 static int inf = (int) 1e15; inf (int) 1e15 static ArrayList<Integer>[] ad; ad static int n n k; k static long[][] memo; memo static char[][] g; g static boolean[] vis; vis static long ans ans tem; tem static long[] a; a public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		out = new PrintWriter(System.out);
		String s = sc.nextLine();
		String s1 = s.substring(0, s.length() / 2);
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		s1 = s.substring(((s.length() + 3) / 2)-1, s.length());
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		s1 = s.substring(0,s.length());
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		System.out.println("Yes");
		out.close();
	} main {
		Scanner sc = new Scanner(System.in);
		out = new PrintWriter(System.out);
		String s = sc.nextLine();
		String s1 = s.substring(0, s.length() / 2);
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		s1 = s.substring(((s.length() + 3) / 2)-1, s.length());
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		s1 = s.substring(0,s.length());
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		System.out.println("Yes");
		out.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) out = new PrintWriter(System.out) out new PrintWriter(System.out) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc String s1 = s.substring(0, s.length() / 2); s1 s.substring(0, s.length() / 2) s.substring s 0 s.length() / 2 s.length() s.length s 2 for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			} int i = 0, j = s1.length() - 1; int i = 0 i 0 j = s1.length() - 1; j s1.length() - 1 s1.length() s1.length s1 1 i < s1.length() i s1.length() s1.length s1 i++, j-- i++ i j-- j if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			} if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			} s1.charAt(i) != s1.charAt(j) s1.charAt(i) s1.charAt s1 i s1.charAt(j) s1.charAt s1 j {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; s1 = s.substring(((s.length() + 3) / 2)-1, s.length()) s1 s.substring(((s.length() + 3) / 2)-1, s.length()) s.substring s ((s.length() + 3) / 2)-1 ((s.length() + 3) / 2) (s.length() + 3) s.length() s.length s 3 2 1 s.length() s.length s for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			} int i = 0, j = s1.length() - 1; int i = 0 i 0 j = s1.length() - 1; j s1.length() - 1 s1.length() s1.length s1 1 i < s1.length() i s1.length() s1.length s1 i++, j-- i++ i j-- j if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			} if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			} s1.charAt(i) != s1.charAt(j) s1.charAt(i) s1.charAt s1 i s1.charAt(j) s1.charAt s1 j {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; s1 = s.substring(0,s.length()) s1 s.substring(0,s.length()) s.substring s 0 s.length() s.length s for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			} int i = 0, j = s1.length() - 1; int i = 0 i 0 j = s1.length() - 1; j s1.length() - 1 s1.length() s1.length s1 1 i < s1.length() i s1.length() s1.length s1 i++, j-- i++ i j-- j if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			} if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			} s1.charAt(i) != s1.charAt(j) s1.charAt(i) s1.charAt s1 i s1.charAt(j) s1.charAt s1 j {
				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" out.close() out.close out String[] args args static long cal(int i, int u, int p) {
		if (memo[i][u] != -1)
			return memo[i][u];
		long ans = 1;
		for (int v : ad[i]) {
			if (v == p)
				continue;
			if (u == 0) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + 2 * cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else if (u == 1) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else {
				long tem = 0;
				tem = cal(v, 0, i) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			}
		}
		return memo[i][u] = ans;
	} cal {
		if (memo[i][u] != -1)
			return memo[i][u];
		long ans = 1;
		for (int v : ad[i]) {
			if (v == p)
				continue;
			if (u == 0) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + 2 * cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else if (u == 1) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else {
				long tem = 0;
				tem = cal(v, 0, i) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			}
		}
		return memo[i][u] = ans;
	} if (memo[i][u] != -1)
			return memo[i][u]; memo[i][u] != -1 memo[i][u] memo[i] memo i u -1 1 return memo[i][u]; memo[i][u] memo[i] memo i u long ans = 1; ans 1 for (int v : ad[i]) {
			if (v == p)
				continue;
			if (u == 0) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + 2 * cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else if (u == 1) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else {
				long tem = 0;
				tem = cal(v, 0, i) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			}
		} int v ad[i] ad i {
			if (v == p)
				continue;
			if (u == 0) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + 2 * cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else if (u == 1) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else {
				long tem = 0;
				tem = cal(v, 0, i) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			}
		} {
			if (v == p)
				continue;
			if (u == 0) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + 2 * cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else if (u == 1) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else {
				long tem = 0;
				tem = cal(v, 0, i) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			}
		} if (v == p)
				continue; v == p v p continue; if (u == 0) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + 2 * cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else if (u == 1) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else {
				long tem = 0;
				tem = cal(v, 0, i) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} u == 0 u 0 {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + 2 * cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} long tem = 0; tem 0 tem = (2 * cal(v, 0, i)) % mod tem (2 * cal(v, 0, i)) % mod (2 * cal(v, 0, i)) 2 cal(v, 0, i) cal v 0 i mod tem = (tem + 2 * cal(v, 1, i)) % mod tem (tem + 2 * cal(v, 1, i)) % mod (tem + 2 * cal(v, 1, i)) tem 2 * cal(v, 1, i) 2 cal(v, 1, i) cal v 1 i mod tem = (tem - cal(v, 2, i) + mod) % mod tem (tem - cal(v, 2, i) + mod) % mod (tem - cal(v, 2, i) + mod) tem - cal(v, 2, i) tem cal(v, 2, i) cal v 2 i mod mod ans = ans * tem % mod ans ans * tem % mod ans * tem ans tem mod if (u == 1) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else {
				long tem = 0;
				tem = cal(v, 0, i) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} u == 1 u 1 {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} long tem = 0; tem 0 tem = (2 * cal(v, 0, i)) % mod tem (2 * cal(v, 0, i)) % mod (2 * cal(v, 0, i)) 2 cal(v, 0, i) cal v 0 i mod tem = (tem + cal(v, 1, i)) % mod tem (tem + cal(v, 1, i)) % mod (tem + cal(v, 1, i)) tem cal(v, 1, i) cal v 1 i mod tem = (tem - cal(v, 2, i) + mod) % mod tem (tem - cal(v, 2, i) + mod) % mod (tem - cal(v, 2, i) + mod) tem - cal(v, 2, i) tem cal(v, 2, i) cal v 2 i mod mod ans = ans * tem % mod ans ans * tem % mod ans * tem ans tem mod {
				long tem = 0;
				tem = cal(v, 0, i) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} long tem = 0; tem 0 tem = cal(v, 0, i) % mod tem cal(v, 0, i) % mod cal(v, 0, i) cal v 0 i mod tem = (tem + cal(v, 1, i)) % mod tem (tem + cal(v, 1, i)) % mod (tem + cal(v, 1, i)) tem cal(v, 1, i) cal v 1 i mod tem = (tem - cal(v, 2, i) + mod) % mod tem (tem - cal(v, 2, i) + mod) % mod (tem - cal(v, 2, i) + mod) tem - cal(v, 2, i) tem cal(v, 2, i) cal v 2 i mod mod ans = ans * tem % mod ans ans * tem % mod ans * tem ans tem mod return memo[i][u] = ans; memo[i][u] = ans memo[i][u] memo[i] memo i u ans int i i int u u int p p static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public int[] nextArrInt(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public long[] nextArrLong(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	} Scanner StringTokenizer st; st BufferedReader br; br public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		} Scanner {
			br = new BufferedReader(new InputStreamReader(system));
		} br = new BufferedReader(new InputStreamReader(system)) br new BufferedReader(new InputStreamReader(system)) InputStream system system public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		} Scanner {
			br = new BufferedReader(new FileReader(file));
		} br = new BufferedReader(new FileReader(file)) br new BufferedReader(new FileReader(file)) String file file public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		} next {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		} while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine()); st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public String nextLine() throws IOException {
			return br.readLine();
		} nextLine {
			return br.readLine();
		} return br.readLine(); br.readLine() br.readLine br public int nextInt() throws IOException {
			return Integer.parseInt(next());
		} nextInt {
			return Integer.parseInt(next());
		} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		} nextDouble {
			return Double.parseDouble(next());
		} return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next public char nextChar() throws IOException {
			return next().charAt(0);
		} nextChar {
			return next().charAt(0);
		} return next().charAt(0); next().charAt(0) next().charAt next() next 0 public Long nextLong() throws IOException {
			return Long.parseLong(next());
		} nextLong {
			return Long.parseLong(next());
		} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public int[] nextArrInt(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		} nextArrInt {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		} int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++)
				a[i] = nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[i] = nextInt(); a[i] = nextInt() a[i] a i nextInt() nextInt return a; a int n n public long[] nextArrLong(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		} nextArrLong {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		} long[] a = new long[n]; a new long[n] n for (int i = 0; i < n; i++)
				a[i] = nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[i] = nextInt(); a[i] = nextInt() a[i] a i nextInt() nextInt return a; a int n n public boolean ready() throws IOException {
			return br.ready();
		} ready {
			return br.ready();
		} return br.ready(); br.ready() br.ready br public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		} waitForInput {
			Thread.sleep(3000);
		} Thread.sleep(3000) Thread.sleep Thread 3000 public class Main {
	static PrintWriter out;
	static StringBuilder sb;
	static long mod = 998244353;
	static int inf = (int) 1e15;
	static ArrayList<Integer>[] ad;
	static int n, k;
	static long[][] memo;
	static char[][] g;
	static boolean[] vis;
	static long ans, tem;
	static long[] a;

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		out = new PrintWriter(System.out);
		String s = sc.nextLine();
		String s1 = s.substring(0, s.length() / 2);
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		s1 = s.substring(((s.length() + 3) / 2)-1, s.length());
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		s1 = s.substring(0,s.length());
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		System.out.println("Yes");
		out.close();
	}

	static long cal(int i, int u, int p) {
		if (memo[i][u] != -1)
			return memo[i][u];
		long ans = 1;
		for (int v : ad[i]) {
			if (v == p)
				continue;
			if (u == 0) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + 2 * cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else if (u == 1) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else {
				long tem = 0;
				tem = cal(v, 0, i) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			}
		}
		return memo[i][u] = ans;
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public int[] nextArrInt(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public long[] nextArrLong(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
} public class Main {
	static PrintWriter out;
	static StringBuilder sb;
	static long mod = 998244353;
	static int inf = (int) 1e15;
	static ArrayList<Integer>[] ad;
	static int n, k;
	static long[][] memo;
	static char[][] g;
	static boolean[] vis;
	static long ans, tem;
	static long[] a;

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		out = new PrintWriter(System.out);
		String s = sc.nextLine();
		String s1 = s.substring(0, s.length() / 2);
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		s1 = s.substring(((s.length() + 3) / 2)-1, s.length());
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		s1 = s.substring(0,s.length());
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		System.out.println("Yes");
		out.close();
	}

	static long cal(int i, int u, int p) {
		if (memo[i][u] != -1)
			return memo[i][u];
		long ans = 1;
		for (int v : ad[i]) {
			if (v == p)
				continue;
			if (u == 0) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + 2 * cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else if (u == 1) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else {
				long tem = 0;
				tem = cal(v, 0, i) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			}
		}
		return memo[i][u] = ans;
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public int[] nextArrInt(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public long[] nextArrLong(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
} Main
import java.util.*;
import java.io.*;

public class Main {
	static PrintWriter out;
	static StringBuilder sb;
	static long mod = 998244353;
	static int inf = (int) 1e15;
	static ArrayList<Integer>[] ad;
	static int n, k;
	static long[][] memo;
	static char[][] g;
	static boolean[] vis;
	static long ans, tem;
	static long[] a;

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		out = new PrintWriter(System.out);
		String s = sc.nextLine();
		String s1 = s.substring(0, s.length() / 2);
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		s1 = s.substring(((s.length() + 3) / 2)-1, s.length());
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		s1 = s.substring(0,s.length());
		for (int i = 0, j = s1.length() - 1; i < s1.length(); i++, j--)
			if (s1.charAt(i) != s1.charAt(j)) {
				System.out.println("No");
				return;
			}
		System.out.println("Yes");
		out.close();
	}

	static long cal(int i, int u, int p) {
		if (memo[i][u] != -1)
			return memo[i][u];
		long ans = 1;
		for (int v : ad[i]) {
			if (v == p)
				continue;
			if (u == 0) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + 2 * cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else if (u == 1) {
				long tem = 0;
				tem = (2 * cal(v, 0, i)) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			} else {
				long tem = 0;
				tem = cal(v, 0, i) % mod;
				tem = (tem + cal(v, 1, i)) % mod;
				tem = (tem - cal(v, 2, i) + mod) % mod;
				ans = ans * tem % mod;
			}
		}
		return memo[i][u] = ans;
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public int[] nextArrInt(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public long[] nextArrLong(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}
