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