import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		sc.close();
		int n = str.length();

        StringBuffer sb2 = new StringBuffer(str);
		String dst2 = sb2.reverse().toString();
		if (str.compareTo(dst2) != 0) {
			System.out.println("No");
			return;
		}

		String sub1 = str.substring(0,(n-1)/2);
		StringBuffer sb = new StringBuffer(sub1);
		String dst = sb.reverse().toString();
		if (sub1.compareTo(dst) != 0) {
			System.out.println("No");
			return;
		}
		sub1 = str.substring((n+3)/2-1, n);
        sb = new StringBuffer(sub1);
		dst = sb.reverse().toString();
		if (sub1.compareTo(dst) != 0) {
			System.out.println("No");
			return;
		}



		System.out.println("Yes");
	}
} import java.util.Scanner; Scanner java.util public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		sc.close();
		int n = str.length();

        StringBuffer sb2 = new StringBuffer(str);
		String dst2 = sb2.reverse().toString();
		if (str.compareTo(dst2) != 0) {
			System.out.println("No");
			return;
		}

		String sub1 = str.substring(0,(n-1)/2);
		StringBuffer sb = new StringBuffer(sub1);
		String dst = sb.reverse().toString();
		if (sub1.compareTo(dst) != 0) {
			System.out.println("No");
			return;
		}
		sub1 = str.substring((n+3)/2-1, n);
        sb = new StringBuffer(sub1);
		dst = sb.reverse().toString();
		if (sub1.compareTo(dst) != 0) {
			System.out.println("No");
			return;
		}



		System.out.println("Yes");
	}
} Main public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		sc.close();
		int n = str.length();

        StringBuffer sb2 = new StringBuffer(str);
		String dst2 = sb2.reverse().toString();
		if (str.compareTo(dst2) != 0) {
			System.out.println("No");
			return;
		}

		String sub1 = str.substring(0,(n-1)/2);
		StringBuffer sb = new StringBuffer(sub1);
		String dst = sb.reverse().toString();
		if (sub1.compareTo(dst) != 0) {
			System.out.println("No");
			return;
		}
		sub1 = str.substring((n+3)/2-1, n);
        sb = new StringBuffer(sub1);
		dst = sb.reverse().toString();
		if (sub1.compareTo(dst) != 0) {
			System.out.println("No");
			return;
		}



		System.out.println("Yes");
	} main {
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		sc.close();
		int n = str.length();

        StringBuffer sb2 = new StringBuffer(str);
		String dst2 = sb2.reverse().toString();
		if (str.compareTo(dst2) != 0) {
			System.out.println("No");
			return;
		}

		String sub1 = str.substring(0,(n-1)/2);
		StringBuffer sb = new StringBuffer(sub1);
		String dst = sb.reverse().toString();
		if (sub1.compareTo(dst) != 0) {
			System.out.println("No");
			return;
		}
		sub1 = str.substring((n+3)/2-1, n);
        sb = new StringBuffer(sub1);
		dst = sb.reverse().toString();
		if (sub1.compareTo(dst) != 0) {
			System.out.println("No");
			return;
		}



		System.out.println("Yes");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc sc.close() sc.close sc int n = str.length(); n str.length() str.length str StringBuffer sb2 = new StringBuffer(str); sb2 new StringBuffer(str) String dst2 = sb2.reverse().toString(); dst2 sb2.reverse().toString() sb2.reverse().toString sb2.reverse() sb2.reverse sb2 if (str.compareTo(dst2) != 0) {
			System.out.println("No");
			return;
		} str.compareTo(dst2) != 0 str.compareTo(dst2) str.compareTo str dst2 0 {
			System.out.println("No");
			return;
		} System.out.println("No") System.out.println System.out System System.out "No" return; String sub1 = str.substring(0,(n-1)/2); sub1 str.substring(0,(n-1)/2) str.substring str 0 (n-1)/2 (n-1) n 1 2 StringBuffer sb = new StringBuffer(sub1); sb new StringBuffer(sub1) String dst = sb.reverse().toString(); dst sb.reverse().toString() sb.reverse().toString sb.reverse() sb.reverse sb if (sub1.compareTo(dst) != 0) {
			System.out.println("No");
			return;
		} sub1.compareTo(dst) != 0 sub1.compareTo(dst) sub1.compareTo sub1 dst 0 {
			System.out.println("No");
			return;
		} System.out.println("No") System.out.println System.out System System.out "No" return; sub1 = str.substring((n+3)/2-1, n) sub1 str.substring((n+3)/2-1, n) str.substring str (n+3)/2-1 (n+3)/2 (n+3) n 3 2 1 n sb = new StringBuffer(sub1) sb new StringBuffer(sub1) dst = sb.reverse().toString() dst sb.reverse().toString() sb.reverse().toString sb.reverse() sb.reverse sb if (sub1.compareTo(dst) != 0) {
			System.out.println("No");
			return;
		} sub1.compareTo(dst) != 0 sub1.compareTo(dst) sub1.compareTo sub1 dst 0 {
			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)
	{
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		sc.close();
		int n = str.length();

        StringBuffer sb2 = new StringBuffer(str);
		String dst2 = sb2.reverse().toString();
		if (str.compareTo(dst2) != 0) {
			System.out.println("No");
			return;
		}

		String sub1 = str.substring(0,(n-1)/2);
		StringBuffer sb = new StringBuffer(sub1);
		String dst = sb.reverse().toString();
		if (sub1.compareTo(dst) != 0) {
			System.out.println("No");
			return;
		}
		sub1 = str.substring((n+3)/2-1, n);
        sb = new StringBuffer(sub1);
		dst = sb.reverse().toString();
		if (sub1.compareTo(dst) != 0) {
			System.out.println("No");
			return;
		}



		System.out.println("Yes");
	}
} public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		sc.close();
		int n = str.length();

        StringBuffer sb2 = new StringBuffer(str);
		String dst2 = sb2.reverse().toString();
		if (str.compareTo(dst2) != 0) {
			System.out.println("No");
			return;
		}

		String sub1 = str.substring(0,(n-1)/2);
		StringBuffer sb = new StringBuffer(sub1);
		String dst = sb.reverse().toString();
		if (sub1.compareTo(dst) != 0) {
			System.out.println("No");
			return;
		}
		sub1 = str.substring((n+3)/2-1, n);
        sb = new StringBuffer(sub1);
		dst = sb.reverse().toString();
		if (sub1.compareTo(dst) != 0) {
			System.out.println("No");
			return;
		}



		System.out.println("Yes");
	}
} Main
import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		sc.close();
		int n = str.length();

        StringBuffer sb2 = new StringBuffer(str);
		String dst2 = sb2.reverse().toString();
		if (str.compareTo(dst2) != 0) {
			System.out.println("No");
			return;
		}

		String sub1 = str.substring(0,(n-1)/2);
		StringBuffer sb = new StringBuffer(sub1);
		String dst = sb.reverse().toString();
		if (sub1.compareTo(dst) != 0) {
			System.out.println("No");
			return;
		}
		sub1 = str.substring((n+3)/2-1, n);
        sb = new StringBuffer(sub1);
		dst = sb.reverse().toString();
		if (sub1.compareTo(dst) != 0) {
			System.out.println("No");
			return;
		}



		System.out.println("Yes");
	}
}
