import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        boolean ans = isPalind(str, 0, str.length()) &&
                isPalind(str, 0, (str.length() - 1) / 2) &&
                isPalind(str, (str.length() + 3) / 2 - 1, str.length());
        System.out.println(ans ? "Yes" : "No");
    }

    static boolean isPalind(String str, int s, int e) {
        StringBuilder rsb = new StringBuilder();
        char[] C = str.toCharArray();
        for(int i = s; i < e - s; i++) {
            if(C[i] != C[e - i - 1]) return false;
        }
        return true;
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        boolean ans = isPalind(str, 0, str.length()) &&
                isPalind(str, 0, (str.length() - 1) / 2) &&
                isPalind(str, (str.length() + 3) / 2 - 1, str.length());
        System.out.println(ans ? "Yes" : "No");
    }

    static boolean isPalind(String str, int s, int e) {
        StringBuilder rsb = new StringBuilder();
        char[] C = str.toCharArray();
        for(int i = s; i < e - s; i++) {
            if(C[i] != C[e - i - 1]) return false;
        }
        return true;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        boolean ans = isPalind(str, 0, str.length()) &&
                isPalind(str, 0, (str.length() - 1) / 2) &&
                isPalind(str, (str.length() + 3) / 2 - 1, str.length());
        System.out.println(ans ? "Yes" : "No");
    } main {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        boolean ans = isPalind(str, 0, str.length()) &&
                isPalind(str, 0, (str.length() - 1) / 2) &&
                isPalind(str, (str.length() + 3) / 2 - 1, str.length());
        System.out.println(ans ? "Yes" : "No");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc boolean ans = isPalind(str, 0, str.length()) &&
                isPalind(str, 0, (str.length() - 1) / 2) &&
                isPalind(str, (str.length() + 3) / 2 - 1, str.length()); ans isPalind(str, 0, str.length()) &&
                isPalind(str, 0, (str.length() - 1) / 2) &&
                isPalind(str, (str.length() + 3) / 2 - 1, str.length()) isPalind(str, 0, str.length()) &&
                isPalind(str, 0, (str.length() - 1) / 2) &&
                isPalind(str, (str.length() + 3) / 2 - 1, str.length()) isPalind(str, 0, str.length()) isPalind str 0 str.length() str.length str isPalind(str, 0, (str.length() - 1) / 2) isPalind str 0 (str.length() - 1) / 2 (str.length() - 1) str.length() str.length str 1 2 isPalind(str, (str.length() + 3) / 2 - 1, str.length()) isPalind str (str.length() + 3) / 2 - 1 (str.length() + 3) / 2 (str.length() + 3) str.length() str.length str 3 2 1 str.length() str.length str System.out.println(ans ? "Yes" : "No") System.out.println System.out System System.out ans ? "Yes" : "No" ans "Yes" "No" String[] args args static boolean isPalind(String str, int s, int e) {
        StringBuilder rsb = new StringBuilder();
        char[] C = str.toCharArray();
        for(int i = s; i < e - s; i++) {
            if(C[i] != C[e - i - 1]) return false;
        }
        return true;
    } isPalind {
        StringBuilder rsb = new StringBuilder();
        char[] C = str.toCharArray();
        for(int i = s; i < e - s; i++) {
            if(C[i] != C[e - i - 1]) return false;
        }
        return true;
    } StringBuilder rsb = new StringBuilder(); rsb new StringBuilder() char[] C = str.toCharArray(); C str.toCharArray() str.toCharArray str for(int i = s; i < e - s; i++) {
            if(C[i] != C[e - i - 1]) return false;
        } int i = s; int i = s; i s i < e - s i e - s e s i++ i++ i {
            if(C[i] != C[e - i - 1]) return false;
        } {
            if(C[i] != C[e - i - 1]) return false;
        } if(C[i] != C[e - i - 1]) return false; C[i] != C[e - i - 1] C[i] C i C[e - i - 1] C e - i - 1 e - i - 1 e i 1 return false; false return true; true String str str int s s int e e public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        boolean ans = isPalind(str, 0, str.length()) &&
                isPalind(str, 0, (str.length() - 1) / 2) &&
                isPalind(str, (str.length() + 3) / 2 - 1, str.length());
        System.out.println(ans ? "Yes" : "No");
    }

    static boolean isPalind(String str, int s, int e) {
        StringBuilder rsb = new StringBuilder();
        char[] C = str.toCharArray();
        for(int i = s; i < e - s; i++) {
            if(C[i] != C[e - i - 1]) return false;
        }
        return true;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        boolean ans = isPalind(str, 0, str.length()) &&
                isPalind(str, 0, (str.length() - 1) / 2) &&
                isPalind(str, (str.length() + 3) / 2 - 1, str.length());
        System.out.println(ans ? "Yes" : "No");
    }

    static boolean isPalind(String str, int s, int e) {
        StringBuilder rsb = new StringBuilder();
        char[] C = str.toCharArray();
        for(int i = s; i < e - s; i++) {
            if(C[i] != C[e - i - 1]) return false;
        }
        return true;
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        boolean ans = isPalind(str, 0, str.length()) &&
                isPalind(str, 0, (str.length() - 1) / 2) &&
                isPalind(str, (str.length() + 3) / 2 - 1, str.length());
        System.out.println(ans ? "Yes" : "No");
    }

    static boolean isPalind(String str, int s, int e) {
        StringBuilder rsb = new StringBuilder();
        char[] C = str.toCharArray();
        for(int i = s; i < e - s; i++) {
            if(C[i] != C[e - i - 1]) return false;
        }
        return true;
    }
}
