import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = s.length();
        String sub1 = s.substring(0, (n-1)/2);
        String sub2 = s.substring((n+3)/2-1, n);

        if (isP(s) && isP(sub1) && isP(sub2)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
        
    }
    
    private static boolean isP(String s){
      //System.out.println(s);
        int l = 0;
        int r = s.length()-1;
        while (l <= r) {
            if (s.charAt(l) != s.charAt(r)) return false;
            l++;
            r--;
        }
        return true;
        
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = s.length();
        String sub1 = s.substring(0, (n-1)/2);
        String sub2 = s.substring((n+3)/2-1, n);

        if (isP(s) && isP(sub1) && isP(sub2)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
        
    }
    
    private static boolean isP(String s){
      //System.out.println(s);
        int l = 0;
        int r = s.length()-1;
        while (l <= r) {
            if (s.charAt(l) != s.charAt(r)) return false;
            l++;
            r--;
        }
        return true;
        
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = s.length();
        String sub1 = s.substring(0, (n-1)/2);
        String sub2 = s.substring((n+3)/2-1, n);

        if (isP(s) && isP(sub1) && isP(sub2)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
        
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = s.length();
        String sub1 = s.substring(0, (n-1)/2);
        String sub2 = s.substring((n+3)/2-1, n);

        if (isP(s) && isP(sub1) && isP(sub2)) {
            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 int n = s.length(); n s.length() s.length s String sub1 = s.substring(0, (n-1)/2); sub1 s.substring(0, (n-1)/2) s.substring s 0 (n-1)/2 (n-1) n 1 2 String sub2 = s.substring((n+3)/2-1, n); sub2 s.substring((n+3)/2-1, n) s.substring s (n+3)/2-1 (n+3)/2 (n+3) n 3 2 1 n if (isP(s) && isP(sub1) && isP(sub2)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } isP(s) && isP(sub1) && isP(sub2) isP(s) && isP(sub1) && isP(sub2) isP(s) isP s isP(sub1) isP sub1 isP(sub2) isP sub2 {
            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 private static boolean isP(String s){
      //System.out.println(s);
        int l = 0;
        int r = s.length()-1;
        while (l <= r) {
            if (s.charAt(l) != s.charAt(r)) return false;
            l++;
            r--;
        }
        return true;
        
    } isP {
      //System.out.println(s);
        int l = 0;
        int r = s.length()-1;
        while (l <= r) {
            if (s.charAt(l) != s.charAt(r)) return false;
            l++;
            r--;
        }
        return true;
        
    } int l = 0; l 0 int r = s.length()-1; r s.length()-1 s.length() s.length s 1 while (l <= r) {
            if (s.charAt(l) != s.charAt(r)) return false;
            l++;
            r--;
        } l <= r l r {
            if (s.charAt(l) != s.charAt(r)) return false;
            l++;
            r--;
        } if (s.charAt(l) != s.charAt(r)) return false; s.charAt(l) != s.charAt(r) s.charAt(l) s.charAt s l s.charAt(r) s.charAt s r return false; false l++ l r-- r return true; true String s s public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = s.length();
        String sub1 = s.substring(0, (n-1)/2);
        String sub2 = s.substring((n+3)/2-1, n);

        if (isP(s) && isP(sub1) && isP(sub2)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
        
    }
    
    private static boolean isP(String s){
      //System.out.println(s);
        int l = 0;
        int r = s.length()-1;
        while (l <= r) {
            if (s.charAt(l) != s.charAt(r)) return false;
            l++;
            r--;
        }
        return true;
        
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = s.length();
        String sub1 = s.substring(0, (n-1)/2);
        String sub2 = s.substring((n+3)/2-1, n);

        if (isP(s) && isP(sub1) && isP(sub2)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
        
    }
    
    private static boolean isP(String s){
      //System.out.println(s);
        int l = 0;
        int r = s.length()-1;
        while (l <= r) {
            if (s.charAt(l) != s.charAt(r)) return false;
            l++;
            r--;
        }
        return true;
        
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = s.length();
        String sub1 = s.substring(0, (n-1)/2);
        String sub2 = s.substring((n+3)/2-1, n);

        if (isP(s) && isP(sub1) && isP(sub2)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
        
    }
    
    private static boolean isP(String s){
      //System.out.println(s);
        int l = 0;
        int r = s.length()-1;
        while (l <= r) {
            if (s.charAt(l) != s.charAt(r)) return false;
            l++;
            r--;
        }
        return true;
        
    }
}