import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	char[] S = sc.next().toCharArray();
    	sc.close();
    	boolean ans = true;
    	int len = S.length;
    	int t1 = len-1;
    	for(int i = 0; i < len/2; i++){
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	}
    	t1 = (len-1)/2-1;
    	for(int i = 0; i < t1/2; i++){
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	}
    	t1 = (len+3)/2-1;
    	int t2 = len-(t1-1)/2;
    	int t3 = len-1;
    	for(int i = t1; i < t2; i++){
    		if(S[i] != S[t3]){
    			ans = false;
    		}
    		t3--;
    	}
    	System.out.println(ans?"Yes":"No");
    }

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

	public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	char[] S = sc.next().toCharArray();
    	sc.close();
    	boolean ans = true;
    	int len = S.length;
    	int t1 = len-1;
    	for(int i = 0; i < len/2; i++){
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	}
    	t1 = (len-1)/2-1;
    	for(int i = 0; i < t1/2; i++){
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	}
    	t1 = (len+3)/2-1;
    	int t2 = len-(t1-1)/2;
    	int t3 = len-1;
    	for(int i = t1; i < t2; i++){
    		if(S[i] != S[t3]){
    			ans = false;
    		}
    		t3--;
    	}
    	System.out.println(ans?"Yes":"No");
    }

} Main public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	char[] S = sc.next().toCharArray();
    	sc.close();
    	boolean ans = true;
    	int len = S.length;
    	int t1 = len-1;
    	for(int i = 0; i < len/2; i++){
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	}
    	t1 = (len-1)/2-1;
    	for(int i = 0; i < t1/2; i++){
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	}
    	t1 = (len+3)/2-1;
    	int t2 = len-(t1-1)/2;
    	int t3 = len-1;
    	for(int i = t1; i < t2; i++){
    		if(S[i] != S[t3]){
    			ans = false;
    		}
    		t3--;
    	}
    	System.out.println(ans?"Yes":"No");
    } main {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	char[] S = sc.next().toCharArray();
    	sc.close();
    	boolean ans = true;
    	int len = S.length;
    	int t1 = len-1;
    	for(int i = 0; i < len/2; i++){
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	}
    	t1 = (len-1)/2-1;
    	for(int i = 0; i < t1/2; i++){
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	}
    	t1 = (len+3)/2-1;
    	int t2 = len-(t1-1)/2;
    	int t3 = len-1;
    	for(int i = t1; i < t2; i++){
    		if(S[i] != S[t3]){
    			ans = false;
    		}
    		t3--;
    	}
    	System.out.println(ans?"Yes":"No");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] S = sc.next().toCharArray(); S sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc sc.close() sc.close sc boolean ans = true; ans true int len = S.length; len S.length S S.length int t1 = len-1; t1 len-1 len 1 for(int i = 0; i < len/2; i++){
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	} int i = 0; int i = 0; i 0 i < len/2 i len/2 len 2 i++ i++ i {
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	} {
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	} if(S[i] != S[t1]){
    			ans = false;
    		} S[i] != S[t1] S[i] S i S[t1] S t1 {
    			ans = false;
    		} ans = false ans false t1-- t1 t1 = (len-1)/2-1 t1 (len-1)/2-1 (len-1)/2 (len-1) len 1 2 1 for(int i = 0; i < t1/2; i++){
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	} int i = 0; int i = 0; i 0 i < t1/2 i t1/2 t1 2 i++ i++ i {
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	} {
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	} if(S[i] != S[t1]){
    			ans = false;
    		} S[i] != S[t1] S[i] S i S[t1] S t1 {
    			ans = false;
    		} ans = false ans false t1-- t1 t1 = (len+3)/2-1 t1 (len+3)/2-1 (len+3)/2 (len+3) len 3 2 1 int t2 = len-(t1-1)/2; t2 len-(t1-1)/2 len (t1-1)/2 (t1-1) t1 1 2 int t3 = len-1; t3 len-1 len 1 for(int i = t1; i < t2; i++){
    		if(S[i] != S[t3]){
    			ans = false;
    		}
    		t3--;
    	} int i = t1; int i = t1; i t1 i < t2 i t2 i++ i++ i {
    		if(S[i] != S[t3]){
    			ans = false;
    		}
    		t3--;
    	} {
    		if(S[i] != S[t3]){
    			ans = false;
    		}
    		t3--;
    	} if(S[i] != S[t3]){
    			ans = false;
    		} S[i] != S[t3] S[i] S i S[t3] S t3 {
    			ans = false;
    		} ans = false ans false t3-- t3 System.out.println(ans?"Yes":"No") System.out.println System.out System System.out ans?"Yes":"No" ans "Yes" "No" String[] args args public class Main {

	public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	char[] S = sc.next().toCharArray();
    	sc.close();
    	boolean ans = true;
    	int len = S.length;
    	int t1 = len-1;
    	for(int i = 0; i < len/2; i++){
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	}
    	t1 = (len-1)/2-1;
    	for(int i = 0; i < t1/2; i++){
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	}
    	t1 = (len+3)/2-1;
    	int t2 = len-(t1-1)/2;
    	int t3 = len-1;
    	for(int i = t1; i < t2; i++){
    		if(S[i] != S[t3]){
    			ans = false;
    		}
    		t3--;
    	}
    	System.out.println(ans?"Yes":"No");
    }

} public class Main {

	public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	char[] S = sc.next().toCharArray();
    	sc.close();
    	boolean ans = true;
    	int len = S.length;
    	int t1 = len-1;
    	for(int i = 0; i < len/2; i++){
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	}
    	t1 = (len-1)/2-1;
    	for(int i = 0; i < t1/2; i++){
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	}
    	t1 = (len+3)/2-1;
    	int t2 = len-(t1-1)/2;
    	int t3 = len-1;
    	for(int i = t1; i < t2; i++){
    		if(S[i] != S[t3]){
    			ans = false;
    		}
    		t3--;
    	}
    	System.out.println(ans?"Yes":"No");
    }

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {

//    	File file = new File("test.txt");
//    	Scanner sc = new Scanner(file);
    	Scanner sc = new Scanner(System.in);
    	char[] S = sc.next().toCharArray();
    	sc.close();
    	boolean ans = true;
    	int len = S.length;
    	int t1 = len-1;
    	for(int i = 0; i < len/2; i++){
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	}
    	t1 = (len-1)/2-1;
    	for(int i = 0; i < t1/2; i++){
    		if(S[i] != S[t1]){
    			ans = false;
    		}
    		t1--;
    	}
    	t1 = (len+3)/2-1;
    	int t2 = len-(t1-1)/2;
    	int t3 = len-1;
    	for(int i = t1; i < t2; i++){
    		if(S[i] != S[t3]){
    			ans = false;
    		}
    		t3--;
    	}
    	System.out.println(ans?"Yes":"No");
    }

}