import java.util.*;
import java.math.*;
public class Main {
	static int r; 
	static int c;
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.next();
		int r = s.length() - 1;
		String ans = "Yes";
		if(isPal(s.substring(0, ((r - 1) / 2) + 1)) == false) ans = "No";
		if(isPal(s.substring((r + 3) / 2, r + 1)) == false) ans = "No";
		if(isPal(s) == false) ans = "No";
		System.out.println(ans);
	}
	public static boolean isPal(String s) {
		int l = 0;
		int r = s.length() - 1;
		while(l <= r) {
			if(s.charAt(l) != s.charAt(r)) return false;
			l += 1;
			r -= 1;
		}
		return true;
	}
}  import java.util.*; util.* java import java.math.*; math.* java public class Main {
	static int r; 
	static int c;
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.next();
		int r = s.length() - 1;
		String ans = "Yes";
		if(isPal(s.substring(0, ((r - 1) / 2) + 1)) == false) ans = "No";
		if(isPal(s.substring((r + 3) / 2, r + 1)) == false) ans = "No";
		if(isPal(s) == false) ans = "No";
		System.out.println(ans);
	}
	public static boolean isPal(String s) {
		int l = 0;
		int r = s.length() - 1;
		while(l <= r) {
			if(s.charAt(l) != s.charAt(r)) return false;
			l += 1;
			r -= 1;
		}
		return true;
	}
} Main static int r; r static int c; c public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.next();
		int r = s.length() - 1;
		String ans = "Yes";
		if(isPal(s.substring(0, ((r - 1) / 2) + 1)) == false) ans = "No";
		if(isPal(s.substring((r + 3) / 2, r + 1)) == false) ans = "No";
		if(isPal(s) == false) ans = "No";
		System.out.println(ans);
	} main {
		Scanner in = new Scanner(System.in);
		String s = in.next();
		int r = s.length() - 1;
		String ans = "Yes";
		if(isPal(s.substring(0, ((r - 1) / 2) + 1)) == false) ans = "No";
		if(isPal(s.substring((r + 3) / 2, r + 1)) == false) ans = "No";
		if(isPal(s) == false) ans = "No";
		System.out.println(ans);
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) String s = in.next(); s in.next() in.next in int r = s.length() - 1; r s.length() - 1 s.length() s.length s 1 String ans = "Yes"; ans "Yes" if(isPal(s.substring(0, ((r - 1) / 2) + 1)) == false) ans = "No"; isPal(s.substring(0, ((r - 1) / 2) + 1)) == false isPal(s.substring(0, ((r - 1) / 2) + 1)) isPal s.substring(0, ((r - 1) / 2) + 1) s.substring s 0 ((r - 1) / 2) + 1 ((r - 1) / 2) (r - 1) r 1 2 1 false ans = "No" ans "No" if(isPal(s.substring((r + 3) / 2, r + 1)) == false) ans = "No"; isPal(s.substring((r + 3) / 2, r + 1)) == false isPal(s.substring((r + 3) / 2, r + 1)) isPal s.substring((r + 3) / 2, r + 1) s.substring s (r + 3) / 2 (r + 3) r 3 2 r + 1 r 1 false ans = "No" ans "No" if(isPal(s) == false) ans = "No"; isPal(s) == false isPal(s) isPal s false ans = "No" ans "No" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public static boolean isPal(String s) {
		int l = 0;
		int r = s.length() - 1;
		while(l <= r) {
			if(s.charAt(l) != s.charAt(r)) return false;
			l += 1;
			r -= 1;
		}
		return true;
	} isPal {
		int l = 0;
		int r = s.length() - 1;
		while(l <= r) {
			if(s.charAt(l) != s.charAt(r)) return false;
			l += 1;
			r -= 1;
		}
		return true;
	} int l = 0; l 0 int r = s.length() - 1; r s.length() - 1 s.length() s.length s 1 while(l <= r) {
			if(s.charAt(l) != s.charAt(r)) return false;
			l += 1;
			r -= 1;
		} l <= r l r {
			if(s.charAt(l) != s.charAt(r)) return false;
			l += 1;
			r -= 1;
		} if(s.charAt(l) != s.charAt(r)) return false; s.charAt(l) != s.charAt(r) s.charAt(l) s.charAt s l s.charAt(r) s.charAt s r return false; false l += 1 l 1 r -= 1 r 1 return true; true String s s public class Main {
	static int r; 
	static int c;
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.next();
		int r = s.length() - 1;
		String ans = "Yes";
		if(isPal(s.substring(0, ((r - 1) / 2) + 1)) == false) ans = "No";
		if(isPal(s.substring((r + 3) / 2, r + 1)) == false) ans = "No";
		if(isPal(s) == false) ans = "No";
		System.out.println(ans);
	}
	public static boolean isPal(String s) {
		int l = 0;
		int r = s.length() - 1;
		while(l <= r) {
			if(s.charAt(l) != s.charAt(r)) return false;
			l += 1;
			r -= 1;
		}
		return true;
	}
} public class Main {
	static int r; 
	static int c;
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.next();
		int r = s.length() - 1;
		String ans = "Yes";
		if(isPal(s.substring(0, ((r - 1) / 2) + 1)) == false) ans = "No";
		if(isPal(s.substring((r + 3) / 2, r + 1)) == false) ans = "No";
		if(isPal(s) == false) ans = "No";
		System.out.println(ans);
	}
	public static boolean isPal(String s) {
		int l = 0;
		int r = s.length() - 1;
		while(l <= r) {
			if(s.charAt(l) != s.charAt(r)) return false;
			l += 1;
			r -= 1;
		}
		return true;
	}
} Main
import java.util.*;
import java.math.*;
public class Main {
	static int r; 
	static int c;
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.next();
		int r = s.length() - 1;
		String ans = "Yes";
		if(isPal(s.substring(0, ((r - 1) / 2) + 1)) == false) ans = "No";
		if(isPal(s.substring((r + 3) / 2, r + 1)) == false) ans = "No";
		if(isPal(s) == false) ans = "No";
		System.out.println(ans);
	}
	public static boolean isPal(String s) {
		int l = 0;
		int r = s.length() - 1;
		while(l <= r) {
			if(s.charAt(l) != s.charAt(r)) return false;
			l += 1;
			r -= 1;
		}
		return true;
	}
} 
