import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        // ABC159B - String Palindrome

        Scanner sc = new Scanner(System.in);

        String s = sc.next();

        int len = s.length();

        boolean isOk = check(s);

        boolean isOk2 = check(s.substring(0, ((len - 1) / 2)));

        boolean isOk3 = check(s.substring((((len + 3) / 2) - 1), len));

        System.out.println((isOk && isOk2 && isOk3) ? "Yes": "No");
    }

    static boolean check(String s) {
        
        boolean isKai = true;

        int len = s.length();

        int half = len / 2;

        char[] c = s.toCharArray();

        for (int i = 0; i < half; i++) {
            if (c[i] != c[len - 1 - i]) {
                isKai = false;
                break;
            }
        }

        return isKai;
    }
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz