import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();

		StringBuffer sb = new StringBuffer();
		for(int i = S.length(); i > 0; i--) {
			sb.append(S.charAt(i - 1));
		}
		String R = sb.toString();

		int len = S.length();

		String start = S.substring(0, (len - 1) / 2);
		StringBuffer str = new StringBuffer();
		for(int i = start.length(); i > 0; i--) {
			str.append(start.charAt(i - 1));
		}
		String checkStart = str.toString();

		String end = S.substring((len + 3) / 2 - 1, len);
		StringBuffer en = new StringBuffer();
		for(int i = end.length(); i > 0; i--) {
			en.append(end.charAt(i - 1));
		}
		String checkEnd = en.toString();


		if(len > 5) {
			if(S.equals(R) && start.equals(checkStart) && end.equals(checkEnd)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		}else if(len == 5) {
			if(S.equals(R) && S.charAt(0) == S.charAt(1) && S.charAt(3) == S.charAt(4)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		}else {
				System.out.println("Yes");
				return;
		}
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();

		StringBuffer sb = new StringBuffer();
		for(int i = S.length(); i > 0; i--) {
			sb.append(S.charAt(i - 1));
		}
		String R = sb.toString();

		int len = S.length();

		String start = S.substring(0, (len - 1) / 2);
		StringBuffer str = new StringBuffer();
		for(int i = start.length(); i > 0; i--) {
			str.append(start.charAt(i - 1));
		}
		String checkStart = str.toString();

		String end = S.substring((len + 3) / 2 - 1, len);
		StringBuffer en = new StringBuffer();
		for(int i = end.length(); i > 0; i--) {
			en.append(end.charAt(i - 1));
		}
		String checkEnd = en.toString();


		if(len > 5) {
			if(S.equals(R) && start.equals(checkStart) && end.equals(checkEnd)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		}else if(len == 5) {
			if(S.equals(R) && S.charAt(0) == S.charAt(1) && S.charAt(3) == S.charAt(4)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		}else {
				System.out.println("Yes");
				return;
		}
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();

		StringBuffer sb = new StringBuffer();
		for(int i = S.length(); i > 0; i--) {
			sb.append(S.charAt(i - 1));
		}
		String R = sb.toString();

		int len = S.length();

		String start = S.substring(0, (len - 1) / 2);
		StringBuffer str = new StringBuffer();
		for(int i = start.length(); i > 0; i--) {
			str.append(start.charAt(i - 1));
		}
		String checkStart = str.toString();

		String end = S.substring((len + 3) / 2 - 1, len);
		StringBuffer en = new StringBuffer();
		for(int i = end.length(); i > 0; i--) {
			en.append(end.charAt(i - 1));
		}
		String checkEnd = en.toString();


		if(len > 5) {
			if(S.equals(R) && start.equals(checkStart) && end.equals(checkEnd)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		}else if(len == 5) {
			if(S.equals(R) && S.charAt(0) == S.charAt(1) && S.charAt(3) == S.charAt(4)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		}else {
				System.out.println("Yes");
				return;
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();

		StringBuffer sb = new StringBuffer();
		for(int i = S.length(); i > 0; i--) {
			sb.append(S.charAt(i - 1));
		}
		String R = sb.toString();

		int len = S.length();

		String start = S.substring(0, (len - 1) / 2);
		StringBuffer str = new StringBuffer();
		for(int i = start.length(); i > 0; i--) {
			str.append(start.charAt(i - 1));
		}
		String checkStart = str.toString();

		String end = S.substring((len + 3) / 2 - 1, len);
		StringBuffer en = new StringBuffer();
		for(int i = end.length(); i > 0; i--) {
			en.append(end.charAt(i - 1));
		}
		String checkEnd = en.toString();


		if(len > 5) {
			if(S.equals(R) && start.equals(checkStart) && end.equals(checkEnd)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		}else if(len == 5) {
			if(S.equals(R) && S.charAt(0) == S.charAt(1) && S.charAt(3) == S.charAt(4)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		}else {
				System.out.println("Yes");
				return;
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc sc.close() sc.close sc StringBuffer sb = new StringBuffer(); sb new StringBuffer() for(int i = S.length(); i > 0; i--) {
			sb.append(S.charAt(i - 1));
		} int i = S.length(); int i = S.length(); i S.length() S.length S i > 0 i 0 i-- i-- i {
			sb.append(S.charAt(i - 1));
		} {
			sb.append(S.charAt(i - 1));
		} sb.append(S.charAt(i - 1)) sb.append sb S.charAt(i - 1) S.charAt S i - 1 i 1 String R = sb.toString(); R sb.toString() sb.toString sb int len = S.length(); len S.length() S.length S String start = S.substring(0, (len - 1) / 2); start S.substring(0, (len - 1) / 2) S.substring S 0 (len - 1) / 2 (len - 1) len 1 2 StringBuffer str = new StringBuffer(); str new StringBuffer() for(int i = start.length(); i > 0; i--) {
			str.append(start.charAt(i - 1));
		} int i = start.length(); int i = start.length(); i start.length() start.length start i > 0 i 0 i-- i-- i {
			str.append(start.charAt(i - 1));
		} {
			str.append(start.charAt(i - 1));
		} str.append(start.charAt(i - 1)) str.append str start.charAt(i - 1) start.charAt start i - 1 i 1 String checkStart = str.toString(); checkStart str.toString() str.toString str String end = S.substring((len + 3) / 2 - 1, len); end S.substring((len + 3) / 2 - 1, len) S.substring S (len + 3) / 2 - 1 (len + 3) / 2 (len + 3) len 3 2 1 len StringBuffer en = new StringBuffer(); en new StringBuffer() for(int i = end.length(); i > 0; i--) {
			en.append(end.charAt(i - 1));
		} int i = end.length(); int i = end.length(); i end.length() end.length end i > 0 i 0 i-- i-- i {
			en.append(end.charAt(i - 1));
		} {
			en.append(end.charAt(i - 1));
		} en.append(end.charAt(i - 1)) en.append en end.charAt(i - 1) end.charAt end i - 1 i 1 String checkEnd = en.toString(); checkEnd en.toString() en.toString en if(len > 5) {
			if(S.equals(R) && start.equals(checkStart) && end.equals(checkEnd)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		}else if(len == 5) {
			if(S.equals(R) && S.charAt(0) == S.charAt(1) && S.charAt(3) == S.charAt(4)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		}else {
				System.out.println("Yes");
				return;
		} len > 5 len 5 {
			if(S.equals(R) && start.equals(checkStart) && end.equals(checkEnd)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		} if(S.equals(R) && start.equals(checkStart) && end.equals(checkEnd)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			} S.equals(R) && start.equals(checkStart) && end.equals(checkEnd) S.equals(R) && start.equals(checkStart) && end.equals(checkEnd) S.equals(R) S.equals S R start.equals(checkStart) start.equals start checkStart end.equals(checkEnd) end.equals end checkEnd {
				System.out.println("Yes");
				return;
			} System.out.println("Yes") System.out.println System.out System System.out "Yes" return; {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; if(len == 5) {
			if(S.equals(R) && S.charAt(0) == S.charAt(1) && S.charAt(3) == S.charAt(4)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		}else {
				System.out.println("Yes");
				return;
		} len == 5 len 5 {
			if(S.equals(R) && S.charAt(0) == S.charAt(1) && S.charAt(3) == S.charAt(4)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		} if(S.equals(R) && S.charAt(0) == S.charAt(1) && S.charAt(3) == S.charAt(4)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			} S.equals(R) && S.charAt(0) == S.charAt(1) && S.charAt(3) == S.charAt(4) S.equals(R) && S.charAt(0) == S.charAt(1) && S.charAt(3) == S.charAt(4) S.equals(R) S.equals S R S.charAt(0) == S.charAt(1) S.charAt(0) S.charAt S 0 S.charAt(1) S.charAt S 1 S.charAt(3) == S.charAt(4) S.charAt(3) S.charAt S 3 S.charAt(4) S.charAt S 4 {
				System.out.println("Yes");
				return;
			} System.out.println("Yes") System.out.println System.out System System.out "Yes" return; {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; {
				System.out.println("Yes");
				return;
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" return; String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();

		StringBuffer sb = new StringBuffer();
		for(int i = S.length(); i > 0; i--) {
			sb.append(S.charAt(i - 1));
		}
		String R = sb.toString();

		int len = S.length();

		String start = S.substring(0, (len - 1) / 2);
		StringBuffer str = new StringBuffer();
		for(int i = start.length(); i > 0; i--) {
			str.append(start.charAt(i - 1));
		}
		String checkStart = str.toString();

		String end = S.substring((len + 3) / 2 - 1, len);
		StringBuffer en = new StringBuffer();
		for(int i = end.length(); i > 0; i--) {
			en.append(end.charAt(i - 1));
		}
		String checkEnd = en.toString();


		if(len > 5) {
			if(S.equals(R) && start.equals(checkStart) && end.equals(checkEnd)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		}else if(len == 5) {
			if(S.equals(R) && S.charAt(0) == S.charAt(1) && S.charAt(3) == S.charAt(4)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		}else {
				System.out.println("Yes");
				return;
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();

		StringBuffer sb = new StringBuffer();
		for(int i = S.length(); i > 0; i--) {
			sb.append(S.charAt(i - 1));
		}
		String R = sb.toString();

		int len = S.length();

		String start = S.substring(0, (len - 1) / 2);
		StringBuffer str = new StringBuffer();
		for(int i = start.length(); i > 0; i--) {
			str.append(start.charAt(i - 1));
		}
		String checkStart = str.toString();

		String end = S.substring((len + 3) / 2 - 1, len);
		StringBuffer en = new StringBuffer();
		for(int i = end.length(); i > 0; i--) {
			en.append(end.charAt(i - 1));
		}
		String checkEnd = en.toString();


		if(len > 5) {
			if(S.equals(R) && start.equals(checkStart) && end.equals(checkEnd)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		}else if(len == 5) {
			if(S.equals(R) && S.charAt(0) == S.charAt(1) && S.charAt(3) == S.charAt(4)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		}else {
				System.out.println("Yes");
				return;
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();

		StringBuffer sb = new StringBuffer();
		for(int i = S.length(); i > 0; i--) {
			sb.append(S.charAt(i - 1));
		}
		String R = sb.toString();

		int len = S.length();

		String start = S.substring(0, (len - 1) / 2);
		StringBuffer str = new StringBuffer();
		for(int i = start.length(); i > 0; i--) {
			str.append(start.charAt(i - 1));
		}
		String checkStart = str.toString();

		String end = S.substring((len + 3) / 2 - 1, len);
		StringBuffer en = new StringBuffer();
		for(int i = end.length(); i > 0; i--) {
			en.append(end.charAt(i - 1));
		}
		String checkEnd = en.toString();


		if(len > 5) {
			if(S.equals(R) && start.equals(checkStart) && end.equals(checkEnd)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		}else if(len == 5) {
			if(S.equals(R) && S.charAt(0) == S.charAt(1) && S.charAt(3) == S.charAt(4)) {
				System.out.println("Yes");
				return;
			}else {
				System.out.println("No");
				return;
			}
		}else {
				System.out.println("Yes");
				return;
		}
	}

}