import java.util.Scanner;

public class Main {

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

        String input_line = sc.nextLine();
        int N=input_line.length();

        String string1=input_line.substring(0, (N-1)/2);
        String string2=input_line.substring((N+3)/2-1,N);

        StringBuffer sb1 = new StringBuffer(string1);
        StringBuffer sb2 = new StringBuffer(string2);
        StringBuffer sb3 = new StringBuffer(input_line);

        String string1_rev=sb1.reverse().toString();
        String string2_rev=sb2.reverse().toString();
        String input_line_rev=sb3.reverse().toString();

        if(string1_rev.equals(string1)&&string2_rev.equals(string2)&&input_line_rev.equals(input_line)) {
        	System.out.print("Yes");
        }
        else {
        	System.out.print("No");
        }

	}

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

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

        String input_line = sc.nextLine();
        int N=input_line.length();

        String string1=input_line.substring(0, (N-1)/2);
        String string2=input_line.substring((N+3)/2-1,N);

        StringBuffer sb1 = new StringBuffer(string1);
        StringBuffer sb2 = new StringBuffer(string2);
        StringBuffer sb3 = new StringBuffer(input_line);

        String string1_rev=sb1.reverse().toString();
        String string2_rev=sb2.reverse().toString();
        String input_line_rev=sb3.reverse().toString();

        if(string1_rev.equals(string1)&&string2_rev.equals(string2)&&input_line_rev.equals(input_line)) {
        	System.out.print("Yes");
        }
        else {
        	System.out.print("No");
        }

	}

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

        String input_line = sc.nextLine();
        int N=input_line.length();

        String string1=input_line.substring(0, (N-1)/2);
        String string2=input_line.substring((N+3)/2-1,N);

        StringBuffer sb1 = new StringBuffer(string1);
        StringBuffer sb2 = new StringBuffer(string2);
        StringBuffer sb3 = new StringBuffer(input_line);

        String string1_rev=sb1.reverse().toString();
        String string2_rev=sb2.reverse().toString();
        String input_line_rev=sb3.reverse().toString();

        if(string1_rev.equals(string1)&&string2_rev.equals(string2)&&input_line_rev.equals(input_line)) {
        	System.out.print("Yes");
        }
        else {
        	System.out.print("No");
        }

	} main {
		Scanner sc = new Scanner(System.in);

        String input_line = sc.nextLine();
        int N=input_line.length();

        String string1=input_line.substring(0, (N-1)/2);
        String string2=input_line.substring((N+3)/2-1,N);

        StringBuffer sb1 = new StringBuffer(string1);
        StringBuffer sb2 = new StringBuffer(string2);
        StringBuffer sb3 = new StringBuffer(input_line);

        String string1_rev=sb1.reverse().toString();
        String string2_rev=sb2.reverse().toString();
        String input_line_rev=sb3.reverse().toString();

        if(string1_rev.equals(string1)&&string2_rev.equals(string2)&&input_line_rev.equals(input_line)) {
        	System.out.print("Yes");
        }
        else {
        	System.out.print("No");
        }

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input_line = sc.nextLine(); input_line sc.nextLine() sc.nextLine sc int N=input_line.length(); N input_line.length() input_line.length input_line String string1=input_line.substring(0, (N-1)/2); string1 input_line.substring(0, (N-1)/2) input_line.substring input_line 0 (N-1)/2 (N-1) N 1 2 String string2=input_line.substring((N+3)/2-1,N); string2 input_line.substring((N+3)/2-1,N) input_line.substring input_line (N+3)/2-1 (N+3)/2 (N+3) N 3 2 1 N StringBuffer sb1 = new StringBuffer(string1); sb1 new StringBuffer(string1) StringBuffer sb2 = new StringBuffer(string2); sb2 new StringBuffer(string2) StringBuffer sb3 = new StringBuffer(input_line); sb3 new StringBuffer(input_line) String string1_rev=sb1.reverse().toString(); string1_rev sb1.reverse().toString() sb1.reverse().toString sb1.reverse() sb1.reverse sb1 String string2_rev=sb2.reverse().toString(); string2_rev sb2.reverse().toString() sb2.reverse().toString sb2.reverse() sb2.reverse sb2 String input_line_rev=sb3.reverse().toString(); input_line_rev sb3.reverse().toString() sb3.reverse().toString sb3.reverse() sb3.reverse sb3 if(string1_rev.equals(string1)&&string2_rev.equals(string2)&&input_line_rev.equals(input_line)) {
        	System.out.print("Yes");
        }
        else {
        	System.out.print("No");
        } string1_rev.equals(string1)&&string2_rev.equals(string2)&&input_line_rev.equals(input_line) string1_rev.equals(string1)&&string2_rev.equals(string2)&&input_line_rev.equals(input_line) string1_rev.equals(string1) string1_rev.equals string1_rev string1 string2_rev.equals(string2) string2_rev.equals string2_rev string2 input_line_rev.equals(input_line) input_line_rev.equals input_line_rev input_line {
        	System.out.print("Yes");
        } System.out.print("Yes") System.out.print System.out System System.out "Yes" {
        	System.out.print("No");
        } System.out.print("No") System.out.print System.out System System.out "No" String[] args args public class Main {

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

        String input_line = sc.nextLine();
        int N=input_line.length();

        String string1=input_line.substring(0, (N-1)/2);
        String string2=input_line.substring((N+3)/2-1,N);

        StringBuffer sb1 = new StringBuffer(string1);
        StringBuffer sb2 = new StringBuffer(string2);
        StringBuffer sb3 = new StringBuffer(input_line);

        String string1_rev=sb1.reverse().toString();
        String string2_rev=sb2.reverse().toString();
        String input_line_rev=sb3.reverse().toString();

        if(string1_rev.equals(string1)&&string2_rev.equals(string2)&&input_line_rev.equals(input_line)) {
        	System.out.print("Yes");
        }
        else {
        	System.out.print("No");
        }

	}

} public class Main {

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

        String input_line = sc.nextLine();
        int N=input_line.length();

        String string1=input_line.substring(0, (N-1)/2);
        String string2=input_line.substring((N+3)/2-1,N);

        StringBuffer sb1 = new StringBuffer(string1);
        StringBuffer sb2 = new StringBuffer(string2);
        StringBuffer sb3 = new StringBuffer(input_line);

        String string1_rev=sb1.reverse().toString();
        String string2_rev=sb2.reverse().toString();
        String input_line_rev=sb3.reverse().toString();

        if(string1_rev.equals(string1)&&string2_rev.equals(string2)&&input_line_rev.equals(input_line)) {
        	System.out.print("Yes");
        }
        else {
        	System.out.print("No");
        }

	}

} Main
import java.util.Scanner;

public class Main {

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

        String input_line = sc.nextLine();
        int N=input_line.length();

        String string1=input_line.substring(0, (N-1)/2);
        String string2=input_line.substring((N+3)/2-1,N);

        StringBuffer sb1 = new StringBuffer(string1);
        StringBuffer sb2 = new StringBuffer(string2);
        StringBuffer sb3 = new StringBuffer(input_line);

        String string1_rev=sb1.reverse().toString();
        String string2_rev=sb2.reverse().toString();
        String input_line_rev=sb3.reverse().toString();

        if(string1_rev.equals(string1)&&string2_rev.equals(string2)&&input_line_rev.equals(input_line)) {
        	System.out.print("Yes");
        }
        else {
        	System.out.print("No");
        }

	}

}