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

        int cou = 0;
        for(int i=0; i<S.length()/2; i++){
            if(ss[i]!=ss[S.length()-1-i]){
                cou++;
    }
}
        for(int i=0; i<(S.length()-1)/2/2; i++){
            if(ss[i]!=ss[(S.length()-1)/2-1-i]){
                cou++;
    }
}
         for(int i=((S.length()+3)/2)-1; i<S.length(); i++){
            if(ss[((S.length()+3)/2)-1]!=ss[S.length()-1]){
                cou++;
    }
}
        if(cou==0){
            System.out.println("Yes");    
        }else{
            System.out.println("No");
    }
}
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[]ss = S.toCharArray();

        int cou = 0;
        for(int i=0; i<S.length()/2; i++){
            if(ss[i]!=ss[S.length()-1-i]){
                cou++;
    }
}
        for(int i=0; i<(S.length()-1)/2/2; i++){
            if(ss[i]!=ss[(S.length()-1)/2-1-i]){
                cou++;
    }
}
         for(int i=((S.length()+3)/2)-1; i<S.length(); i++){
            if(ss[((S.length()+3)/2)-1]!=ss[S.length()-1]){
                cou++;
    }
}
        if(cou==0){
            System.out.println("Yes");    
        }else{
            System.out.println("No");
    }
}
} Main public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[]ss = S.toCharArray();

        int cou = 0;
        for(int i=0; i<S.length()/2; i++){
            if(ss[i]!=ss[S.length()-1-i]){
                cou++;
    }
}
        for(int i=0; i<(S.length()-1)/2/2; i++){
            if(ss[i]!=ss[(S.length()-1)/2-1-i]){
                cou++;
    }
}
         for(int i=((S.length()+3)/2)-1; i<S.length(); i++){
            if(ss[((S.length()+3)/2)-1]!=ss[S.length()-1]){
                cou++;
    }
}
        if(cou==0){
            System.out.println("Yes");    
        }else{
            System.out.println("No");
    }
} main {
    
    Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[]ss = S.toCharArray();

        int cou = 0;
        for(int i=0; i<S.length()/2; i++){
            if(ss[i]!=ss[S.length()-1-i]){
                cou++;
    }
}
        for(int i=0; i<(S.length()-1)/2/2; i++){
            if(ss[i]!=ss[(S.length()-1)/2-1-i]){
                cou++;
    }
}
         for(int i=((S.length()+3)/2)-1; i<S.length(); i++){
            if(ss[((S.length()+3)/2)-1]!=ss[S.length()-1]){
                cou++;
    }
}
        if(cou==0){
            System.out.println("Yes");    
        }else{
            System.out.println("No");
    }
} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc char[]ss = S.toCharArray(); ss S.toCharArray() S.toCharArray S int cou = 0; cou 0 for(int i=0; i<S.length()/2; i++){
            if(ss[i]!=ss[S.length()-1-i]){
                cou++;
    }
} int i=0; int i=0; i 0 i<S.length()/2 i S.length()/2 S.length() S.length S 2 i++ i++ i {
            if(ss[i]!=ss[S.length()-1-i]){
                cou++;
    }
} {
            if(ss[i]!=ss[S.length()-1-i]){
                cou++;
    }
} if(ss[i]!=ss[S.length()-1-i]){
                cou++;
    } ss[i]!=ss[S.length()-1-i] ss[i] ss i ss[S.length()-1-i] ss S.length()-1-i S.length()-1-i S.length() S.length S 1 i {
                cou++;
    } cou++ cou for(int i=0; i<(S.length()-1)/2/2; i++){
            if(ss[i]!=ss[(S.length()-1)/2-1-i]){
                cou++;
    }
} int i=0; int i=0; i 0 i<(S.length()-1)/2/2 i (S.length()-1)/2/2 (S.length()-1)/2/2 (S.length()-1) S.length() S.length S 1 2 2 i++ i++ i {
            if(ss[i]!=ss[(S.length()-1)/2-1-i]){
                cou++;
    }
} {
            if(ss[i]!=ss[(S.length()-1)/2-1-i]){
                cou++;
    }
} if(ss[i]!=ss[(S.length()-1)/2-1-i]){
                cou++;
    } ss[i]!=ss[(S.length()-1)/2-1-i] ss[i] ss i ss[(S.length()-1)/2-1-i] ss (S.length()-1)/2-1-i (S.length()-1)/2-1-i (S.length()-1)/2 (S.length()-1) S.length() S.length S 1 2 1 i {
                cou++;
    } cou++ cou for(int i=((S.length()+3)/2)-1; i<S.length(); i++){
            if(ss[((S.length()+3)/2)-1]!=ss[S.length()-1]){
                cou++;
    }
} int i=((S.length()+3)/2)-1; int i=((S.length()+3)/2)-1; i ((S.length()+3)/2)-1 ((S.length()+3)/2) (S.length()+3) S.length() S.length S 3 2 1 i<S.length() i S.length() S.length S i++ i++ i {
            if(ss[((S.length()+3)/2)-1]!=ss[S.length()-1]){
                cou++;
    }
} {
            if(ss[((S.length()+3)/2)-1]!=ss[S.length()-1]){
                cou++;
    }
} if(ss[((S.length()+3)/2)-1]!=ss[S.length()-1]){
                cou++;
    } ss[((S.length()+3)/2)-1]!=ss[S.length()-1] ss[((S.length()+3)/2)-1] ss ((S.length()+3)/2)-1 ((S.length()+3)/2) (S.length()+3) S.length() S.length S 3 2 1 ss[S.length()-1] ss S.length()-1 S.length() S.length S 1 {
                cou++;
    } cou++ cou if(cou==0){
            System.out.println("Yes");    
        }else{
            System.out.println("No");
    } cou==0 cou 0 {
            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 sc = new Scanner(System.in);
        String S = sc.next();
        char[]ss = S.toCharArray();

        int cou = 0;
        for(int i=0; i<S.length()/2; i++){
            if(ss[i]!=ss[S.length()-1-i]){
                cou++;
    }
}
        for(int i=0; i<(S.length()-1)/2/2; i++){
            if(ss[i]!=ss[(S.length()-1)/2-1-i]){
                cou++;
    }
}
         for(int i=((S.length()+3)/2)-1; i<S.length(); i++){
            if(ss[((S.length()+3)/2)-1]!=ss[S.length()-1]){
                cou++;
    }
}
        if(cou==0){
            System.out.println("Yes");    
        }else{
            System.out.println("No");
    }
}
} public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[]ss = S.toCharArray();

        int cou = 0;
        for(int i=0; i<S.length()/2; i++){
            if(ss[i]!=ss[S.length()-1-i]){
                cou++;
    }
}
        for(int i=0; i<(S.length()-1)/2/2; i++){
            if(ss[i]!=ss[(S.length()-1)/2-1-i]){
                cou++;
    }
}
         for(int i=((S.length()+3)/2)-1; i<S.length(); i++){
            if(ss[((S.length()+3)/2)-1]!=ss[S.length()-1]){
                cou++;
    }
}
        if(cou==0){
            System.out.println("Yes");    
        }else{
            System.out.println("No");
    }
}
} Main
import java.util.*;
public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[]ss = S.toCharArray();

        int cou = 0;
        for(int i=0; i<S.length()/2; i++){
            if(ss[i]!=ss[S.length()-1-i]){
                cou++;
    }
}
        for(int i=0; i<(S.length()-1)/2/2; i++){
            if(ss[i]!=ss[(S.length()-1)/2-1-i]){
                cou++;
    }
}
         for(int i=((S.length()+3)/2)-1; i<S.length(); i++){
            if(ss[((S.length()+3)/2)-1]!=ss[S.length()-1]){
                cou++;
    }
}
        if(cou==0){
            System.out.println("Yes");    
        }else{
            System.out.println("No");
    }
}
}
