import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int n;
        String s,ans="No";
        StringBuilder sbs = new StringBuilder();
        StringBuilder sbh1 = new StringBuilder();
        StringBuilder sbh2 = new StringBuilder();
        
        s = sc.nextLine();
        n = s.length();
        String firstHalf = s.substring(0, (n-1) / 2);
        String secondHalf = s.substring((n+3) / 2 - 1, n);
        
        sbs.append(s);
        sbh1.append(firstHalf);
        sbh2.append(secondHalf);
        
        if(s.equals(sbs.reverse().toString())){
            if(firstHalf.equals(sbh1.reverse().toString())){
                if(secondHalf.equals(sbh2.reverse().toString())){
                    ans = "Yes";
                }
            }
        }
        
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int n;
        String s,ans="No";
        StringBuilder sbs = new StringBuilder();
        StringBuilder sbh1 = new StringBuilder();
        StringBuilder sbh2 = new StringBuilder();
        
        s = sc.nextLine();
        n = s.length();
        String firstHalf = s.substring(0, (n-1) / 2);
        String secondHalf = s.substring((n+3) / 2 - 1, n);
        
        sbs.append(s);
        sbh1.append(firstHalf);
        sbh2.append(secondHalf);
        
        if(s.equals(sbs.reverse().toString())){
            if(firstHalf.equals(sbh1.reverse().toString())){
                if(secondHalf.equals(sbh2.reverse().toString())){
                    ans = "Yes";
                }
            }
        }
        
        System.out.println(ans);
    }
} Main public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int n;
        String s,ans="No";
        StringBuilder sbs = new StringBuilder();
        StringBuilder sbh1 = new StringBuilder();
        StringBuilder sbh2 = new StringBuilder();
        
        s = sc.nextLine();
        n = s.length();
        String firstHalf = s.substring(0, (n-1) / 2);
        String secondHalf = s.substring((n+3) / 2 - 1, n);
        
        sbs.append(s);
        sbh1.append(firstHalf);
        sbh2.append(secondHalf);
        
        if(s.equals(sbs.reverse().toString())){
            if(firstHalf.equals(sbh1.reverse().toString())){
                if(secondHalf.equals(sbh2.reverse().toString())){
                    ans = "Yes";
                }
            }
        }
        
        System.out.println(ans);
    } main {
        
        Scanner sc = new Scanner(System.in);
        int n;
        String s,ans="No";
        StringBuilder sbs = new StringBuilder();
        StringBuilder sbh1 = new StringBuilder();
        StringBuilder sbh2 = new StringBuilder();
        
        s = sc.nextLine();
        n = s.length();
        String firstHalf = s.substring(0, (n-1) / 2);
        String secondHalf = s.substring((n+3) / 2 - 1, n);
        
        sbs.append(s);
        sbh1.append(firstHalf);
        sbh2.append(secondHalf);
        
        if(s.equals(sbs.reverse().toString())){
            if(firstHalf.equals(sbh1.reverse().toString())){
                if(secondHalf.equals(sbh2.reverse().toString())){
                    ans = "Yes";
                }
            }
        }
        
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n; n String s s ans="No"; ans "No" StringBuilder sbs = new StringBuilder(); sbs new StringBuilder() StringBuilder sbh1 = new StringBuilder(); sbh1 new StringBuilder() StringBuilder sbh2 = new StringBuilder(); sbh2 new StringBuilder() s = sc.nextLine() s sc.nextLine() sc.nextLine sc n = s.length() n s.length() s.length s String firstHalf = s.substring(0, (n-1) / 2); firstHalf s.substring(0, (n-1) / 2) s.substring s 0 (n-1) / 2 (n-1) n 1 2 String secondHalf = s.substring((n+3) / 2 - 1, n); secondHalf s.substring((n+3) / 2 - 1, n) s.substring s (n+3) / 2 - 1 (n+3) / 2 (n+3) n 3 2 1 n sbs.append(s) sbs.append sbs s sbh1.append(firstHalf) sbh1.append sbh1 firstHalf sbh2.append(secondHalf) sbh2.append sbh2 secondHalf if(s.equals(sbs.reverse().toString())){
            if(firstHalf.equals(sbh1.reverse().toString())){
                if(secondHalf.equals(sbh2.reverse().toString())){
                    ans = "Yes";
                }
            }
        } s.equals(sbs.reverse().toString()) s.equals s sbs.reverse().toString() sbs.reverse().toString sbs.reverse() sbs.reverse sbs {
            if(firstHalf.equals(sbh1.reverse().toString())){
                if(secondHalf.equals(sbh2.reverse().toString())){
                    ans = "Yes";
                }
            }
        } if(firstHalf.equals(sbh1.reverse().toString())){
                if(secondHalf.equals(sbh2.reverse().toString())){
                    ans = "Yes";
                }
            } firstHalf.equals(sbh1.reverse().toString()) firstHalf.equals firstHalf sbh1.reverse().toString() sbh1.reverse().toString sbh1.reverse() sbh1.reverse sbh1 {
                if(secondHalf.equals(sbh2.reverse().toString())){
                    ans = "Yes";
                }
            } if(secondHalf.equals(sbh2.reverse().toString())){
                    ans = "Yes";
                } secondHalf.equals(sbh2.reverse().toString()) secondHalf.equals secondHalf sbh2.reverse().toString() sbh2.reverse().toString sbh2.reverse() sbh2.reverse sbh2 {
                    ans = "Yes";
                } ans = "Yes" ans "Yes" 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) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int n;
        String s,ans="No";
        StringBuilder sbs = new StringBuilder();
        StringBuilder sbh1 = new StringBuilder();
        StringBuilder sbh2 = new StringBuilder();
        
        s = sc.nextLine();
        n = s.length();
        String firstHalf = s.substring(0, (n-1) / 2);
        String secondHalf = s.substring((n+3) / 2 - 1, n);
        
        sbs.append(s);
        sbh1.append(firstHalf);
        sbh2.append(secondHalf);
        
        if(s.equals(sbs.reverse().toString())){
            if(firstHalf.equals(sbh1.reverse().toString())){
                if(secondHalf.equals(sbh2.reverse().toString())){
                    ans = "Yes";
                }
            }
        }
        
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int n;
        String s,ans="No";
        StringBuilder sbs = new StringBuilder();
        StringBuilder sbh1 = new StringBuilder();
        StringBuilder sbh2 = new StringBuilder();
        
        s = sc.nextLine();
        n = s.length();
        String firstHalf = s.substring(0, (n-1) / 2);
        String secondHalf = s.substring((n+3) / 2 - 1, n);
        
        sbs.append(s);
        sbh1.append(firstHalf);
        sbh2.append(secondHalf);
        
        if(s.equals(sbs.reverse().toString())){
            if(firstHalf.equals(sbh1.reverse().toString())){
                if(secondHalf.equals(sbh2.reverse().toString())){
                    ans = "Yes";
                }
            }
        }
        
        System.out.println(ans);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int n;
        String s,ans="No";
        StringBuilder sbs = new StringBuilder();
        StringBuilder sbh1 = new StringBuilder();
        StringBuilder sbh2 = new StringBuilder();
        
        s = sc.nextLine();
        n = s.length();
        String firstHalf = s.substring(0, (n-1) / 2);
        String secondHalf = s.substring((n+3) / 2 - 1, n);
        
        sbs.append(s);
        sbh1.append(firstHalf);
        sbh2.append(secondHalf);
        
        if(s.equals(sbs.reverse().toString())){
            if(firstHalf.equals(sbh1.reverse().toString())){
                if(secondHalf.equals(sbh2.reverse().toString())){
                    ans = "Yes";
                }
            }
        }
        
        System.out.println(ans);
    }
}
