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;
    }
} import java.util.Scanner; Scanner java.util 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;
    }
} 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");
    } main {
        // 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");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int len = s.length(); len s.length() s.length s boolean isOk = check(s); isOk check(s) check s boolean isOk2 = check(s.substring(0, ((len - 1) / 2))); isOk2 check(s.substring(0, ((len - 1) / 2))) check s.substring(0, ((len - 1) / 2)) s.substring s 0 ((len - 1) / 2) (len - 1) len 1 2 boolean isOk3 = check(s.substring((((len + 3) / 2) - 1), len)); isOk3 check(s.substring((((len + 3) / 2) - 1), len)) check s.substring((((len + 3) / 2) - 1), len) s.substring s (((len + 3) / 2) - 1) ((len + 3) / 2) (len + 3) len 3 2 1 len System.out.println((isOk && isOk2 && isOk3) ? "Yes": "No") System.out.println System.out System System.out (isOk && isOk2 && isOk3) ? "Yes": "No" (isOk && isOk2 && isOk3) isOk && isOk2 && isOk3 isOk isOk2 isOk3 "Yes" "No" String[] args args 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;
    } check {
        
        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;
    } boolean isKai = true; isKai true int len = s.length(); len s.length() s.length s int half = len / 2; half len / 2 len 2 char[] c = s.toCharArray(); c s.toCharArray() s.toCharArray s for (int i = 0; i < half; i++) {
            if (c[i] != c[len - 1 - i]) {
                isKai = false;
                break;
            }
        } int i = 0; int i = 0; i 0 i < half i half i++ i++ i {
            if (c[i] != c[len - 1 - i]) {
                isKai = false;
                break;
            }
        } {
            if (c[i] != c[len - 1 - i]) {
                isKai = false;
                break;
            }
        } if (c[i] != c[len - 1 - i]) {
                isKai = false;
                break;
            } c[i] != c[len - 1 - i] c[i] c i c[len - 1 - i] c len - 1 - i len - 1 - i len 1 i {
                isKai = false;
                break;
            } isKai = false isKai false break; return isKai; isKai String s s 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;
    }
} 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;
    }
} Main
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;
    }
}