import java.util.*;
import java.util.Map.Entry;
 
class Main {
	 static int mod =  (int) (Math.pow(10,9)+7);
//	 static int mod = 998244353;
	 public static void main(String[] args) {
	        Scanner sc = new Scanner(System.in);
	        String S = sc.next();
	        char[] c = S.toCharArray();
	        int N=c.length;
	        String subS1=S.substring(0,(N-1)/2);
	        String subS2=S.substring((N+1)/2);
	        char[] c1 = subS1.toCharArray();
	        char[] c2 = subS2.toCharArray();
	        int n1=c1.length;
	        int n2=c2.length;
	        boolean flg=false;
	        for(int i=0;i<(N-1)/2;i++) {
	        	if(c[i]!=c[N-i-1])flg=true;
	        }
	        for(int i=0;i<n1/2;i++) {
	        	if(c1[i]!=c1[n1-1-i])flg=true;
	        }
	        for(int i=0;i<n2/2;i++) {
	        	if(c2[i]!=c2[n2-1-i])flg=true;
	        }
	        if(flg) {
		        System.out.println("No");	        	
	        } else {
	        	System.out.println("Yes");	
	        }
	 }
	 

} import java.util.*; util.* java import java.util.Map.Entry; Entry java.util.Map class Main {
	 static int mod =  (int) (Math.pow(10,9)+7);
//	 static int mod = 998244353;
	 public static void main(String[] args) {
	        Scanner sc = new Scanner(System.in);
	        String S = sc.next();
	        char[] c = S.toCharArray();
	        int N=c.length;
	        String subS1=S.substring(0,(N-1)/2);
	        String subS2=S.substring((N+1)/2);
	        char[] c1 = subS1.toCharArray();
	        char[] c2 = subS2.toCharArray();
	        int n1=c1.length;
	        int n2=c2.length;
	        boolean flg=false;
	        for(int i=0;i<(N-1)/2;i++) {
	        	if(c[i]!=c[N-i-1])flg=true;
	        }
	        for(int i=0;i<n1/2;i++) {
	        	if(c1[i]!=c1[n1-1-i])flg=true;
	        }
	        for(int i=0;i<n2/2;i++) {
	        	if(c2[i]!=c2[n2-1-i])flg=true;
	        }
	        if(flg) {
		        System.out.println("No");	        	
	        } else {
	        	System.out.println("Yes");	
	        }
	 }
	 

} Main static int mod =  (int) (Math.pow(10,9)+7); mod (int) (Math.pow(10,9)+7) Math.pow(10,9) Math.pow Math 10 9 7 //	 static int mod = 998244353;
	 public static void main(String[] args) {
	        Scanner sc = new Scanner(System.in);
	        String S = sc.next();
	        char[] c = S.toCharArray();
	        int N=c.length;
	        String subS1=S.substring(0,(N-1)/2);
	        String subS2=S.substring((N+1)/2);
	        char[] c1 = subS1.toCharArray();
	        char[] c2 = subS2.toCharArray();
	        int n1=c1.length;
	        int n2=c2.length;
	        boolean flg=false;
	        for(int i=0;i<(N-1)/2;i++) {
	        	if(c[i]!=c[N-i-1])flg=true;
	        }
	        for(int i=0;i<n1/2;i++) {
	        	if(c1[i]!=c1[n1-1-i])flg=true;
	        }
	        for(int i=0;i<n2/2;i++) {
	        	if(c2[i]!=c2[n2-1-i])flg=true;
	        }
	        if(flg) {
		        System.out.println("No");	        	
	        } else {
	        	System.out.println("Yes");	
	        }
	 } main {
	        Scanner sc = new Scanner(System.in);
	        String S = sc.next();
	        char[] c = S.toCharArray();
	        int N=c.length;
	        String subS1=S.substring(0,(N-1)/2);
	        String subS2=S.substring((N+1)/2);
	        char[] c1 = subS1.toCharArray();
	        char[] c2 = subS2.toCharArray();
	        int n1=c1.length;
	        int n2=c2.length;
	        boolean flg=false;
	        for(int i=0;i<(N-1)/2;i++) {
	        	if(c[i]!=c[N-i-1])flg=true;
	        }
	        for(int i=0;i<n1/2;i++) {
	        	if(c1[i]!=c1[n1-1-i])flg=true;
	        }
	        for(int i=0;i<n2/2;i++) {
	        	if(c2[i]!=c2[n2-1-i])flg=true;
	        }
	        if(flg) {
		        System.out.println("No");	        	
	        } else {
	        	System.out.println("Yes");	
	        }
	 } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc char[] c = S.toCharArray(); c S.toCharArray() S.toCharArray S int N=c.length; N c.length c c.length String subS1=S.substring(0,(N-1)/2); subS1 S.substring(0,(N-1)/2) S.substring S 0 (N-1)/2 (N-1) N 1 2 String subS2=S.substring((N+1)/2); subS2 S.substring((N+1)/2) S.substring S (N+1)/2 (N+1) N 1 2 char[] c1 = subS1.toCharArray(); c1 subS1.toCharArray() subS1.toCharArray subS1 char[] c2 = subS2.toCharArray(); c2 subS2.toCharArray() subS2.toCharArray subS2 int n1=c1.length; n1 c1.length c1 c1.length int n2=c2.length; n2 c2.length c2 c2.length boolean flg=false; flg false for(int i=0;i<(N-1)/2;i++) {
	        	if(c[i]!=c[N-i-1])flg=true;
	        } int i=0; int i=0; i 0 i<(N-1)/2 i (N-1)/2 (N-1) N 1 2 i++ i++ i {
	        	if(c[i]!=c[N-i-1])flg=true;
	        } {
	        	if(c[i]!=c[N-i-1])flg=true;
	        } if(c[i]!=c[N-i-1])flg=true; c[i]!=c[N-i-1] c[i] c i c[N-i-1] c N-i-1 N-i-1 N i 1 flg=true flg true for(int i=0;i<n1/2;i++) {
	        	if(c1[i]!=c1[n1-1-i])flg=true;
	        } int i=0; int i=0; i 0 i<n1/2 i n1/2 n1 2 i++ i++ i {
	        	if(c1[i]!=c1[n1-1-i])flg=true;
	        } {
	        	if(c1[i]!=c1[n1-1-i])flg=true;
	        } if(c1[i]!=c1[n1-1-i])flg=true; c1[i]!=c1[n1-1-i] c1[i] c1 i c1[n1-1-i] c1 n1-1-i n1-1-i n1 1 i flg=true flg true for(int i=0;i<n2/2;i++) {
	        	if(c2[i]!=c2[n2-1-i])flg=true;
	        } int i=0; int i=0; i 0 i<n2/2 i n2/2 n2 2 i++ i++ i {
	        	if(c2[i]!=c2[n2-1-i])flg=true;
	        } {
	        	if(c2[i]!=c2[n2-1-i])flg=true;
	        } if(c2[i]!=c2[n2-1-i])flg=true; c2[i]!=c2[n2-1-i] c2[i] c2 i c2[n2-1-i] c2 n2-1-i n2-1-i n2 1 i flg=true flg true if(flg) {
		        System.out.println("No");	        	
	        } else {
	        	System.out.println("Yes");	
	        } flg {
		        System.out.println("No");	        	
	        } System.out.println("No") System.out.println System.out System System.out "No" {
	        	System.out.println("Yes");	
	        } System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args
import java.util.*;
import java.util.Map.Entry;
 
class Main {
	 static int mod =  (int) (Math.pow(10,9)+7);
//	 static int mod = 998244353;
	 public static void main(String[] args) {
	        Scanner sc = new Scanner(System.in);
	        String S = sc.next();
	        char[] c = S.toCharArray();
	        int N=c.length;
	        String subS1=S.substring(0,(N-1)/2);
	        String subS2=S.substring((N+1)/2);
	        char[] c1 = subS1.toCharArray();
	        char[] c2 = subS2.toCharArray();
	        int n1=c1.length;
	        int n2=c2.length;
	        boolean flg=false;
	        for(int i=0;i<(N-1)/2;i++) {
	        	if(c[i]!=c[N-i-1])flg=true;
	        }
	        for(int i=0;i<n1/2;i++) {
	        	if(c1[i]!=c1[n1-1-i])flg=true;
	        }
	        for(int i=0;i<n2/2;i++) {
	        	if(c2[i]!=c2[n2-1-i])flg=true;
	        }
	        if(flg) {
		        System.out.println("No");	        	
	        } else {
	        	System.out.println("Yes");	
	        }
	 }
	 

}