import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean ans = true;
        if (checkPalindrome(s)) {
            boolean half1 = checkPalindrome(s.substring(0, (s.length() - 1) / 2));
            boolean half2 = checkPalindrome(s.substring((s.length() + 3) / 2 - 1, s.length()));
            ans = half1 && half2;
        } else {
            ans = false;
        }
        System.out.println(ans ? "Yes" : "No");
    }

    public static boolean checkPalindrome(String str) {
        boolean res = true;
        char[] chars = str.toCharArray();
        int strLength = str.length() - 1;
        for (int i = 0; i <= strLength / 2; i++) {
            if (chars[i] != chars[strLength - i]) {
                res = false;
                break;
            }
        }
        return res;
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean ans = true;
        if (checkPalindrome(s)) {
            boolean half1 = checkPalindrome(s.substring(0, (s.length() - 1) / 2));
            boolean half2 = checkPalindrome(s.substring((s.length() + 3) / 2 - 1, s.length()));
            ans = half1 && half2;
        } else {
            ans = false;
        }
        System.out.println(ans ? "Yes" : "No");
    }

    public static boolean checkPalindrome(String str) {
        boolean res = true;
        char[] chars = str.toCharArray();
        int strLength = str.length() - 1;
        for (int i = 0; i <= strLength / 2; i++) {
            if (chars[i] != chars[strLength - i]) {
                res = false;
                break;
            }
        }
        return res;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean ans = true;
        if (checkPalindrome(s)) {
            boolean half1 = checkPalindrome(s.substring(0, (s.length() - 1) / 2));
            boolean half2 = checkPalindrome(s.substring((s.length() + 3) / 2 - 1, s.length()));
            ans = half1 && half2;
        } else {
            ans = false;
        }
        System.out.println(ans ? "Yes" : "No");
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean ans = true;
        if (checkPalindrome(s)) {
            boolean half1 = checkPalindrome(s.substring(0, (s.length() - 1) / 2));
            boolean half2 = checkPalindrome(s.substring((s.length() + 3) / 2 - 1, s.length()));
            ans = half1 && half2;
        } else {
            ans = false;
        }
        System.out.println(ans ? "Yes" : "No");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc boolean ans = true; ans true if (checkPalindrome(s)) {
            boolean half1 = checkPalindrome(s.substring(0, (s.length() - 1) / 2));
            boolean half2 = checkPalindrome(s.substring((s.length() + 3) / 2 - 1, s.length()));
            ans = half1 && half2;
        } else {
            ans = false;
        } checkPalindrome(s) checkPalindrome s {
            boolean half1 = checkPalindrome(s.substring(0, (s.length() - 1) / 2));
            boolean half2 = checkPalindrome(s.substring((s.length() + 3) / 2 - 1, s.length()));
            ans = half1 && half2;
        } boolean half1 = checkPalindrome(s.substring(0, (s.length() - 1) / 2)); half1 checkPalindrome(s.substring(0, (s.length() - 1) / 2)) checkPalindrome 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 boolean half2 = checkPalindrome(s.substring((s.length() + 3) / 2 - 1, s.length())); half2 checkPalindrome(s.substring((s.length() + 3) / 2 - 1, s.length())) checkPalindrome s.substring((s.length() + 3) / 2 - 1, s.length()) s.substring s (s.length() + 3) / 2 - 1 (s.length() + 3) / 2 (s.length() + 3) s.length() s.length s 3 2 1 s.length() s.length s ans = half1 && half2 ans half1 && half2 half1 half2 {
            ans = false;
        } ans = false ans false System.out.println(ans ? "Yes" : "No") System.out.println System.out System System.out ans ? "Yes" : "No" ans "Yes" "No" String[] args args public static boolean checkPalindrome(String str) {
        boolean res = true;
        char[] chars = str.toCharArray();
        int strLength = str.length() - 1;
        for (int i = 0; i <= strLength / 2; i++) {
            if (chars[i] != chars[strLength - i]) {
                res = false;
                break;
            }
        }
        return res;
    } checkPalindrome {
        boolean res = true;
        char[] chars = str.toCharArray();
        int strLength = str.length() - 1;
        for (int i = 0; i <= strLength / 2; i++) {
            if (chars[i] != chars[strLength - i]) {
                res = false;
                break;
            }
        }
        return res;
    } boolean res = true; res true char[] chars = str.toCharArray(); chars str.toCharArray() str.toCharArray str int strLength = str.length() - 1; strLength str.length() - 1 str.length() str.length str 1 for (int i = 0; i <= strLength / 2; i++) {
            if (chars[i] != chars[strLength - i]) {
                res = false;
                break;
            }
        } int i = 0; int i = 0; i 0 i <= strLength / 2 i strLength / 2 strLength 2 i++ i++ i {
            if (chars[i] != chars[strLength - i]) {
                res = false;
                break;
            }
        } {
            if (chars[i] != chars[strLength - i]) {
                res = false;
                break;
            }
        } if (chars[i] != chars[strLength - i]) {
                res = false;
                break;
            } chars[i] != chars[strLength - i] chars[i] chars i chars[strLength - i] chars strLength - i strLength i {
                res = false;
                break;
            } res = false res false break; return res; res String str str public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean ans = true;
        if (checkPalindrome(s)) {
            boolean half1 = checkPalindrome(s.substring(0, (s.length() - 1) / 2));
            boolean half2 = checkPalindrome(s.substring((s.length() + 3) / 2 - 1, s.length()));
            ans = half1 && half2;
        } else {
            ans = false;
        }
        System.out.println(ans ? "Yes" : "No");
    }

    public static boolean checkPalindrome(String str) {
        boolean res = true;
        char[] chars = str.toCharArray();
        int strLength = str.length() - 1;
        for (int i = 0; i <= strLength / 2; i++) {
            if (chars[i] != chars[strLength - i]) {
                res = false;
                break;
            }
        }
        return res;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean ans = true;
        if (checkPalindrome(s)) {
            boolean half1 = checkPalindrome(s.substring(0, (s.length() - 1) / 2));
            boolean half2 = checkPalindrome(s.substring((s.length() + 3) / 2 - 1, s.length()));
            ans = half1 && half2;
        } else {
            ans = false;
        }
        System.out.println(ans ? "Yes" : "No");
    }

    public static boolean checkPalindrome(String str) {
        boolean res = true;
        char[] chars = str.toCharArray();
        int strLength = str.length() - 1;
        for (int i = 0; i <= strLength / 2; i++) {
            if (chars[i] != chars[strLength - i]) {
                res = false;
                break;
            }
        }
        return res;
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean ans = true;
        if (checkPalindrome(s)) {
            boolean half1 = checkPalindrome(s.substring(0, (s.length() - 1) / 2));
            boolean half2 = checkPalindrome(s.substring((s.length() + 3) / 2 - 1, s.length()));
            ans = half1 && half2;
        } else {
            ans = false;
        }
        System.out.println(ans ? "Yes" : "No");
    }

    public static boolean checkPalindrome(String str) {
        boolean res = true;
        char[] chars = str.toCharArray();
        int strLength = str.length() - 1;
        for (int i = 0; i <= strLength / 2; i++) {
            if (chars[i] != chars[strLength - i]) {
                res = false;
                break;
            }
        }
        return res;
    }
}