import java.util.Scanner;

class Main {

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

        String s=stdIn.next();
        char[] c=s.toCharArray();
        int count1=0;
        int count2=0;
        int count3=0;
        int All=0;

        //条件1
        for(int i=0; i<c.length/2; i++){
            if(c[i]==c[c.length-1-i]){
                count1++;
            }
        }
        if(count1==(c.length-1)/2){
            All++;
        }
        //条件2

        for(int i=0; i<(c.length-1)/4; i++){
            if(c[i]==c[((c.length-1)/2)-1-i]){
                count2++;
            }
        }
        if(count2==(c.length-1)/4){
            All++;
        }
        //条件3
        for(int i=0; i<(c.length+1-(c.length+3)/2)/2; i++){
            if(c[(c.length+3)/2+i-1]==c[c.length-1-i]){
                count3++;
            }
        }
        if(count3==(c.length+1-(c.length+3)/2)/2){
            All++;
        }
        
        if(All==3){
            System.out.println("Yes");
            
        }
        else{
            System.out.println("No");
            
        }
        
    }

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

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

        String s=stdIn.next();
        char[] c=s.toCharArray();
        int count1=0;
        int count2=0;
        int count3=0;
        int All=0;

        //条件1
        for(int i=0; i<c.length/2; i++){
            if(c[i]==c[c.length-1-i]){
                count1++;
            }
        }
        if(count1==(c.length-1)/2){
            All++;
        }
        //条件2

        for(int i=0; i<(c.length-1)/4; i++){
            if(c[i]==c[((c.length-1)/2)-1-i]){
                count2++;
            }
        }
        if(count2==(c.length-1)/4){
            All++;
        }
        //条件3
        for(int i=0; i<(c.length+1-(c.length+3)/2)/2; i++){
            if(c[(c.length+3)/2+i-1]==c[c.length-1-i]){
                count3++;
            }
        }
        if(count3==(c.length+1-(c.length+3)/2)/2){
            All++;
        }
        
        if(All==3){
            System.out.println("Yes");
            
        }
        else{
            System.out.println("No");
            
        }
        
    }

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

        String s=stdIn.next();
        char[] c=s.toCharArray();
        int count1=0;
        int count2=0;
        int count3=0;
        int All=0;

        //条件1
        for(int i=0; i<c.length/2; i++){
            if(c[i]==c[c.length-1-i]){
                count1++;
            }
        }
        if(count1==(c.length-1)/2){
            All++;
        }
        //条件2

        for(int i=0; i<(c.length-1)/4; i++){
            if(c[i]==c[((c.length-1)/2)-1-i]){
                count2++;
            }
        }
        if(count2==(c.length-1)/4){
            All++;
        }
        //条件3
        for(int i=0; i<(c.length+1-(c.length+3)/2)/2; i++){
            if(c[(c.length+3)/2+i-1]==c[c.length-1-i]){
                count3++;
            }
        }
        if(count3==(c.length+1-(c.length+3)/2)/2){
            All++;
        }
        
        if(All==3){
            System.out.println("Yes");
            
        }
        else{
            System.out.println("No");
            
        }
        
    } main {
        Scanner stdIn=new Scanner(System.in);

        String s=stdIn.next();
        char[] c=s.toCharArray();
        int count1=0;
        int count2=0;
        int count3=0;
        int All=0;

        //条件1
        for(int i=0; i<c.length/2; i++){
            if(c[i]==c[c.length-1-i]){
                count1++;
            }
        }
        if(count1==(c.length-1)/2){
            All++;
        }
        //条件2

        for(int i=0; i<(c.length-1)/4; i++){
            if(c[i]==c[((c.length-1)/2)-1-i]){
                count2++;
            }
        }
        if(count2==(c.length-1)/4){
            All++;
        }
        //条件3
        for(int i=0; i<(c.length+1-(c.length+3)/2)/2; i++){
            if(c[(c.length+3)/2+i-1]==c[c.length-1-i]){
                count3++;
            }
        }
        if(count3==(c.length+1-(c.length+3)/2)/2){
            All++;
        }
        
        if(All==3){
            System.out.println("Yes");
            
        }
        else{
            System.out.println("No");
            
        }
        
    } Scanner stdIn=new Scanner(System.in); stdIn new Scanner(System.in) String s=stdIn.next(); s stdIn.next() stdIn.next stdIn char[] c=s.toCharArray(); c s.toCharArray() s.toCharArray s int count1=0; count1 0 int count2=0; count2 0 int count3=0; count3 0 int All=0; All 0 for(int i=0; i<c.length/2; i++){
            if(c[i]==c[c.length-1-i]){
                count1++;
            }
        } int i=0; int i=0; i 0 i<c.length/2 i c.length/2 c.length c c.length 2 i++ i++ i {
            if(c[i]==c[c.length-1-i]){
                count1++;
            }
        } {
            if(c[i]==c[c.length-1-i]){
                count1++;
            }
        } if(c[i]==c[c.length-1-i]){
                count1++;
            } c[i]==c[c.length-1-i] c[i] c i c[c.length-1-i] c c.length-1-i c.length-1-i c.length c c.length 1 i {
                count1++;
            } count1++ count1 if(count1==(c.length-1)/2){
            All++;
        } count1==(c.length-1)/2 count1 (c.length-1)/2 (c.length-1) c.length c c.length 1 2 {
            All++;
        } All++ All for(int i=0; i<(c.length-1)/4; i++){
            if(c[i]==c[((c.length-1)/2)-1-i]){
                count2++;
            }
        } int i=0; int i=0; i 0 i<(c.length-1)/4 i (c.length-1)/4 (c.length-1) c.length c c.length 1 4 i++ i++ i {
            if(c[i]==c[((c.length-1)/2)-1-i]){
                count2++;
            }
        } {
            if(c[i]==c[((c.length-1)/2)-1-i]){
                count2++;
            }
        } if(c[i]==c[((c.length-1)/2)-1-i]){
                count2++;
            } c[i]==c[((c.length-1)/2)-1-i] c[i] c i c[((c.length-1)/2)-1-i] c ((c.length-1)/2)-1-i ((c.length-1)/2)-1-i ((c.length-1)/2) (c.length-1) c.length c c.length 1 2 1 i {
                count2++;
            } count2++ count2 if(count2==(c.length-1)/4){
            All++;
        } count2==(c.length-1)/4 count2 (c.length-1)/4 (c.length-1) c.length c c.length 1 4 {
            All++;
        } All++ All for(int i=0; i<(c.length+1-(c.length+3)/2)/2; i++){
            if(c[(c.length+3)/2+i-1]==c[c.length-1-i]){
                count3++;
            }
        } int i=0; int i=0; i 0 i<(c.length+1-(c.length+3)/2)/2 i (c.length+1-(c.length+3)/2)/2 (c.length+1-(c.length+3)/2) c.length+1 c.length c c.length 1 (c.length+3)/2 (c.length+3) c.length c c.length 3 2 2 i++ i++ i {
            if(c[(c.length+3)/2+i-1]==c[c.length-1-i]){
                count3++;
            }
        } {
            if(c[(c.length+3)/2+i-1]==c[c.length-1-i]){
                count3++;
            }
        } if(c[(c.length+3)/2+i-1]==c[c.length-1-i]){
                count3++;
            } c[(c.length+3)/2+i-1]==c[c.length-1-i] c[(c.length+3)/2+i-1] c (c.length+3)/2+i-1 (c.length+3)/2+i (c.length+3)/2 (c.length+3) c.length c c.length 3 2 i 1 c[c.length-1-i] c c.length-1-i c.length-1-i c.length c c.length 1 i {
                count3++;
            } count3++ count3 if(count3==(c.length+1-(c.length+3)/2)/2){
            All++;
        } count3==(c.length+1-(c.length+3)/2)/2 count3 (c.length+1-(c.length+3)/2)/2 (c.length+1-(c.length+3)/2) c.length+1 c.length c c.length 1 (c.length+3)/2 (c.length+3) c.length c c.length 3 2 2 {
            All++;
        } All++ All if(All==3){
            System.out.println("Yes");
            
        }
        else{
            System.out.println("No");
            
        } All==3 All 3 {
            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
import java.util.Scanner;

class Main {

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

        String s=stdIn.next();
        char[] c=s.toCharArray();
        int count1=0;
        int count2=0;
        int count3=0;
        int All=0;

        //条件1
        for(int i=0; i<c.length/2; i++){
            if(c[i]==c[c.length-1-i]){
                count1++;
            }
        }
        if(count1==(c.length-1)/2){
            All++;
        }
        //条件2

        for(int i=0; i<(c.length-1)/4; i++){
            if(c[i]==c[((c.length-1)/2)-1-i]){
                count2++;
            }
        }
        if(count2==(c.length-1)/4){
            All++;
        }
        //条件3
        for(int i=0; i<(c.length+1-(c.length+3)/2)/2; i++){
            if(c[(c.length+3)/2+i-1]==c[c.length-1-i]){
                count3++;
            }
        }
        if(count3==(c.length+1-(c.length+3)/2)/2){
            All++;
        }
        
        if(All==3){
            System.out.println("Yes");
            
        }
        else{
            System.out.println("No");
            
        }
        
    }

}