import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        
        String a = s.substring(0, (s.length()-1)/2);
        String b = s.substring(((s.length()+3)/2)-1);
        String ans = "Yes";
        int cnt = (int)Math.floor(a.length()/2);
        int flg = 1;
        
        for(int i=0; i<Math.floor(s.length()/2); i++){
            if(s.charAt(i)!=s.charAt(s.length()-1-i)){
                ans = "No";
                flg = 0;
                break;
            }
        }
        
        if(flg==1){
            for(int i=0; i<cnt; i++){
                if(a.charAt(i)!=a.charAt(a.length()-1-i)){
                    ans = "No";
                    break;
                }
                if(b.charAt(i)!=b.charAt(b.length()-1-i)){
                    ans = "No";
                    break;
                }
            }
        }
        
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        
        String a = s.substring(0, (s.length()-1)/2);
        String b = s.substring(((s.length()+3)/2)-1);
        String ans = "Yes";
        int cnt = (int)Math.floor(a.length()/2);
        int flg = 1;
        
        for(int i=0; i<Math.floor(s.length()/2); i++){
            if(s.charAt(i)!=s.charAt(s.length()-1-i)){
                ans = "No";
                flg = 0;
                break;
            }
        }
        
        if(flg==1){
            for(int i=0; i<cnt; i++){
                if(a.charAt(i)!=a.charAt(a.length()-1-i)){
                    ans = "No";
                    break;
                }
                if(b.charAt(i)!=b.charAt(b.length()-1-i)){
                    ans = "No";
                    break;
                }
            }
        }
        
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        
        String a = s.substring(0, (s.length()-1)/2);
        String b = s.substring(((s.length()+3)/2)-1);
        String ans = "Yes";
        int cnt = (int)Math.floor(a.length()/2);
        int flg = 1;
        
        for(int i=0; i<Math.floor(s.length()/2); i++){
            if(s.charAt(i)!=s.charAt(s.length()-1-i)){
                ans = "No";
                flg = 0;
                break;
            }
        }
        
        if(flg==1){
            for(int i=0; i<cnt; i++){
                if(a.charAt(i)!=a.charAt(a.length()-1-i)){
                    ans = "No";
                    break;
                }
                if(b.charAt(i)!=b.charAt(b.length()-1-i)){
                    ans = "No";
                    break;
                }
            }
        }
        
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        
        String a = s.substring(0, (s.length()-1)/2);
        String b = s.substring(((s.length()+3)/2)-1);
        String ans = "Yes";
        int cnt = (int)Math.floor(a.length()/2);
        int flg = 1;
        
        for(int i=0; i<Math.floor(s.length()/2); i++){
            if(s.charAt(i)!=s.charAt(s.length()-1-i)){
                ans = "No";
                flg = 0;
                break;
            }
        }
        
        if(flg==1){
            for(int i=0; i<cnt; i++){
                if(a.charAt(i)!=a.charAt(a.length()-1-i)){
                    ans = "No";
                    break;
                }
                if(b.charAt(i)!=b.charAt(b.length()-1-i)){
                    ans = "No";
                    break;
                }
            }
        }
        
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String a = s.substring(0, (s.length()-1)/2); a s.substring(0, (s.length()-1)/2) s.substring s 0 (s.length()-1)/2 (s.length()-1) s.length() s.length s 1 2 String b = s.substring(((s.length()+3)/2)-1); b s.substring(((s.length()+3)/2)-1) s.substring s ((s.length()+3)/2)-1 ((s.length()+3)/2) (s.length()+3) s.length() s.length s 3 2 1 String ans = "Yes"; ans "Yes" int cnt = (int)Math.floor(a.length()/2); cnt (int)Math.floor(a.length()/2) Math.floor Math a.length()/2 a.length() a.length a 2 int flg = 1; flg 1 for(int i=0; i<Math.floor(s.length()/2); i++){
            if(s.charAt(i)!=s.charAt(s.length()-1-i)){
                ans = "No";
                flg = 0;
                break;
            }
        } int i=0; int i=0; i 0 i<Math.floor(s.length()/2) i Math.floor(s.length()/2) Math.floor Math s.length()/2 s.length() s.length s 2 i++ i++ i {
            if(s.charAt(i)!=s.charAt(s.length()-1-i)){
                ans = "No";
                flg = 0;
                break;
            }
        } {
            if(s.charAt(i)!=s.charAt(s.length()-1-i)){
                ans = "No";
                flg = 0;
                break;
            }
        } if(s.charAt(i)!=s.charAt(s.length()-1-i)){
                ans = "No";
                flg = 0;
                break;
            } s.charAt(i)!=s.charAt(s.length()-1-i) s.charAt(i) s.charAt s i s.charAt(s.length()-1-i) s.charAt s s.length()-1-i s.length()-1-i s.length() s.length s 1 i {
                ans = "No";
                flg = 0;
                break;
            } ans = "No" ans "No" flg = 0 flg 0 break; if(flg==1){
            for(int i=0; i<cnt; i++){
                if(a.charAt(i)!=a.charAt(a.length()-1-i)){
                    ans = "No";
                    break;
                }
                if(b.charAt(i)!=b.charAt(b.length()-1-i)){
                    ans = "No";
                    break;
                }
            }
        } flg==1 flg 1 {
            for(int i=0; i<cnt; i++){
                if(a.charAt(i)!=a.charAt(a.length()-1-i)){
                    ans = "No";
                    break;
                }
                if(b.charAt(i)!=b.charAt(b.length()-1-i)){
                    ans = "No";
                    break;
                }
            }
        } for(int i=0; i<cnt; i++){
                if(a.charAt(i)!=a.charAt(a.length()-1-i)){
                    ans = "No";
                    break;
                }
                if(b.charAt(i)!=b.charAt(b.length()-1-i)){
                    ans = "No";
                    break;
                }
            } int i=0; int i=0; i 0 i<cnt i cnt i++ i++ i {
                if(a.charAt(i)!=a.charAt(a.length()-1-i)){
                    ans = "No";
                    break;
                }
                if(b.charAt(i)!=b.charAt(b.length()-1-i)){
                    ans = "No";
                    break;
                }
            } {
                if(a.charAt(i)!=a.charAt(a.length()-1-i)){
                    ans = "No";
                    break;
                }
                if(b.charAt(i)!=b.charAt(b.length()-1-i)){
                    ans = "No";
                    break;
                }
            } if(a.charAt(i)!=a.charAt(a.length()-1-i)){
                    ans = "No";
                    break;
                } a.charAt(i)!=a.charAt(a.length()-1-i) a.charAt(i) a.charAt a i a.charAt(a.length()-1-i) a.charAt a a.length()-1-i a.length()-1-i a.length() a.length a 1 i {
                    ans = "No";
                    break;
                } ans = "No" ans "No" break; if(b.charAt(i)!=b.charAt(b.length()-1-i)){
                    ans = "No";
                    break;
                } b.charAt(i)!=b.charAt(b.length()-1-i) b.charAt(i) b.charAt b i b.charAt(b.length()-1-i) b.charAt b b.length()-1-i b.length()-1-i b.length() b.length b 1 i {
                    ans = "No";
                    break;
                } ans = "No" ans "No" break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        
        String a = s.substring(0, (s.length()-1)/2);
        String b = s.substring(((s.length()+3)/2)-1);
        String ans = "Yes";
        int cnt = (int)Math.floor(a.length()/2);
        int flg = 1;
        
        for(int i=0; i<Math.floor(s.length()/2); i++){
            if(s.charAt(i)!=s.charAt(s.length()-1-i)){
                ans = "No";
                flg = 0;
                break;
            }
        }
        
        if(flg==1){
            for(int i=0; i<cnt; i++){
                if(a.charAt(i)!=a.charAt(a.length()-1-i)){
                    ans = "No";
                    break;
                }
                if(b.charAt(i)!=b.charAt(b.length()-1-i)){
                    ans = "No";
                    break;
                }
            }
        }
        
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        
        String a = s.substring(0, (s.length()-1)/2);
        String b = s.substring(((s.length()+3)/2)-1);
        String ans = "Yes";
        int cnt = (int)Math.floor(a.length()/2);
        int flg = 1;
        
        for(int i=0; i<Math.floor(s.length()/2); i++){
            if(s.charAt(i)!=s.charAt(s.length()-1-i)){
                ans = "No";
                flg = 0;
                break;
            }
        }
        
        if(flg==1){
            for(int i=0; i<cnt; i++){
                if(a.charAt(i)!=a.charAt(a.length()-1-i)){
                    ans = "No";
                    break;
                }
                if(b.charAt(i)!=b.charAt(b.length()-1-i)){
                    ans = "No";
                    break;
                }
            }
        }
        
        System.out.println(ans);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        
        String a = s.substring(0, (s.length()-1)/2);
        String b = s.substring(((s.length()+3)/2)-1);
        String ans = "Yes";
        int cnt = (int)Math.floor(a.length()/2);
        int flg = 1;
        
        for(int i=0; i<Math.floor(s.length()/2); i++){
            if(s.charAt(i)!=s.charAt(s.length()-1-i)){
                ans = "No";
                flg = 0;
                break;
            }
        }
        
        if(flg==1){
            for(int i=0; i<cnt; i++){
                if(a.charAt(i)!=a.charAt(a.length()-1-i)){
                    ans = "No";
                    break;
                }
                if(b.charAt(i)!=b.charAt(b.length()-1-i)){
                    ans = "No";
                    break;
                }
            }
        }
        
        System.out.println(ans);
    }
}