import java.util.*;

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

		String[] str = S.split("");
		int N = str.length;

		String S_two = S.substring(0, (N-1)/2  );
		String S_three = S.substring((N+3)/2 -1, N );

		StringBuffer b_str = new StringBuffer(S);
		StringBuffer b_str_two = new StringBuffer(S_two);
		StringBuffer b_str_three = new StringBuffer(S_three);

        String ReS = b_str.reverse().toString();
        String ReS_two = b_str_two.reverse().toString();
        String ReS_three = b_str_three.reverse().toString();


		boolean one = false;
		boolean two = false;
		boolean three = false;

		if (S.equals(ReS)){
			one = true;
		}
		if (S_two.equals(ReS_two)){
			two = true;
		}
		if (S_three.equals(ReS_three)){
			three = true;
		}


		if (one && two && three){
			System.out.println("Yes");
		} else{
			System.out.println("No");
		}

	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String S = scan.next();

		String[] str = S.split("");
		int N = str.length;

		String S_two = S.substring(0, (N-1)/2  );
		String S_three = S.substring((N+3)/2 -1, N );

		StringBuffer b_str = new StringBuffer(S);
		StringBuffer b_str_two = new StringBuffer(S_two);
		StringBuffer b_str_three = new StringBuffer(S_three);

        String ReS = b_str.reverse().toString();
        String ReS_two = b_str_two.reverse().toString();
        String ReS_three = b_str_three.reverse().toString();


		boolean one = false;
		boolean two = false;
		boolean three = false;

		if (S.equals(ReS)){
			one = true;
		}
		if (S_two.equals(ReS_two)){
			two = true;
		}
		if (S_three.equals(ReS_three)){
			three = true;
		}


		if (one && two && three){
			System.out.println("Yes");
		} else{
			System.out.println("No");
		}

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

		String[] str = S.split("");
		int N = str.length;

		String S_two = S.substring(0, (N-1)/2  );
		String S_three = S.substring((N+3)/2 -1, N );

		StringBuffer b_str = new StringBuffer(S);
		StringBuffer b_str_two = new StringBuffer(S_two);
		StringBuffer b_str_three = new StringBuffer(S_three);

        String ReS = b_str.reverse().toString();
        String ReS_two = b_str_two.reverse().toString();
        String ReS_three = b_str_three.reverse().toString();


		boolean one = false;
		boolean two = false;
		boolean three = false;

		if (S.equals(ReS)){
			one = true;
		}
		if (S_two.equals(ReS_two)){
			two = true;
		}
		if (S_three.equals(ReS_three)){
			three = true;
		}


		if (one && two && three){
			System.out.println("Yes");
		} else{
			System.out.println("No");
		}

	} main {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();

		String[] str = S.split("");
		int N = str.length;

		String S_two = S.substring(0, (N-1)/2  );
		String S_three = S.substring((N+3)/2 -1, N );

		StringBuffer b_str = new StringBuffer(S);
		StringBuffer b_str_two = new StringBuffer(S_two);
		StringBuffer b_str_three = new StringBuffer(S_three);

        String ReS = b_str.reverse().toString();
        String ReS_two = b_str_two.reverse().toString();
        String ReS_three = b_str_three.reverse().toString();


		boolean one = false;
		boolean two = false;
		boolean three = false;

		if (S.equals(ReS)){
			one = true;
		}
		if (S_two.equals(ReS_two)){
			two = true;
		}
		if (S_three.equals(ReS_three)){
			three = true;
		}


		if (one && two && three){
			System.out.println("Yes");
		} else{
			System.out.println("No");
		}

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String S = scan.next(); S scan.next() scan.next scan String[] str = S.split(""); str S.split("") S.split S "" int N = str.length; N str.length str str.length String S_two = S.substring(0, (N-1)/2  ); S_two S.substring(0, (N-1)/2  ) S.substring S 0 (N-1)/2 (N-1) N 1 2 String S_three = S.substring((N+3)/2 -1, N ); S_three S.substring((N+3)/2 -1, N ) S.substring S (N+3)/2 -1 (N+3)/2 (N+3) N 3 2 1 N StringBuffer b_str = new StringBuffer(S); b_str new StringBuffer(S) StringBuffer b_str_two = new StringBuffer(S_two); b_str_two new StringBuffer(S_two) StringBuffer b_str_three = new StringBuffer(S_three); b_str_three new StringBuffer(S_three) String ReS = b_str.reverse().toString(); ReS b_str.reverse().toString() b_str.reverse().toString b_str.reverse() b_str.reverse b_str String ReS_two = b_str_two.reverse().toString(); ReS_two b_str_two.reverse().toString() b_str_two.reverse().toString b_str_two.reverse() b_str_two.reverse b_str_two String ReS_three = b_str_three.reverse().toString(); ReS_three b_str_three.reverse().toString() b_str_three.reverse().toString b_str_three.reverse() b_str_three.reverse b_str_three boolean one = false; one false boolean two = false; two false boolean three = false; three false if (S.equals(ReS)){
			one = true;
		} S.equals(ReS) S.equals S ReS {
			one = true;
		} one = true one true if (S_two.equals(ReS_two)){
			two = true;
		} S_two.equals(ReS_two) S_two.equals S_two ReS_two {
			two = true;
		} two = true two true if (S_three.equals(ReS_three)){
			three = true;
		} S_three.equals(ReS_three) S_three.equals S_three ReS_three {
			three = true;
		} three = true three true if (one && two && three){
			System.out.println("Yes");
		} else{
			System.out.println("No");
		} one && two && three one && two && three one two three {
			System.out.println("Yes");
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String S = scan.next();

		String[] str = S.split("");
		int N = str.length;

		String S_two = S.substring(0, (N-1)/2  );
		String S_three = S.substring((N+3)/2 -1, N );

		StringBuffer b_str = new StringBuffer(S);
		StringBuffer b_str_two = new StringBuffer(S_two);
		StringBuffer b_str_three = new StringBuffer(S_three);

        String ReS = b_str.reverse().toString();
        String ReS_two = b_str_two.reverse().toString();
        String ReS_three = b_str_three.reverse().toString();


		boolean one = false;
		boolean two = false;
		boolean three = false;

		if (S.equals(ReS)){
			one = true;
		}
		if (S_two.equals(ReS_two)){
			two = true;
		}
		if (S_three.equals(ReS_three)){
			three = true;
		}


		if (one && two && three){
			System.out.println("Yes");
		} else{
			System.out.println("No");
		}

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

		String[] str = S.split("");
		int N = str.length;

		String S_two = S.substring(0, (N-1)/2  );
		String S_three = S.substring((N+3)/2 -1, N );

		StringBuffer b_str = new StringBuffer(S);
		StringBuffer b_str_two = new StringBuffer(S_two);
		StringBuffer b_str_three = new StringBuffer(S_three);

        String ReS = b_str.reverse().toString();
        String ReS_two = b_str_two.reverse().toString();
        String ReS_three = b_str_three.reverse().toString();


		boolean one = false;
		boolean two = false;
		boolean three = false;

		if (S.equals(ReS)){
			one = true;
		}
		if (S_two.equals(ReS_two)){
			two = true;
		}
		if (S_three.equals(ReS_three)){
			three = true;
		}


		if (one && two && three){
			System.out.println("Yes");
		} else{
			System.out.println("No");
		}

	}
} Main
import java.util.*;

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

		String[] str = S.split("");
		int N = str.length;

		String S_two = S.substring(0, (N-1)/2  );
		String S_three = S.substring((N+3)/2 -1, N );

		StringBuffer b_str = new StringBuffer(S);
		StringBuffer b_str_two = new StringBuffer(S_two);
		StringBuffer b_str_three = new StringBuffer(S_three);

        String ReS = b_str.reverse().toString();
        String ReS_two = b_str_two.reverse().toString();
        String ReS_three = b_str_three.reverse().toString();


		boolean one = false;
		boolean two = false;
		boolean three = false;

		if (S.equals(ReS)){
			one = true;
		}
		if (S_two.equals(ReS_two)){
			two = true;
		}
		if (S_three.equals(ReS_three)){
			three = true;
		}


		if (one && two && three){
			System.out.println("Yes");
		} else{
			System.out.println("No");
		}

	}
}