import java.util.*;

public class Main {
    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);

        final String S = sc.next();
        sc.close();
        int len = S.length();

        if(!isPalindrome(S)){
            System.out.println("No");
            return;
        }

        String s1 = S.substring(0, (len - 1) / 2);
        String s2 = S.substring((len + 3) / 2 - 1);

        if(!isPalindrome(s1) || !isPalindrome(s2)){
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    }
    static boolean isPalindrome (String s) {
        int n = s.length();
        for (int i=0; i<n/2; i++) {
            if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
        }
        return true;
    }
} import java.util.*; util.* java public class Main {
    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);

        final String S = sc.next();
        sc.close();
        int len = S.length();

        if(!isPalindrome(S)){
            System.out.println("No");
            return;
        }

        String s1 = S.substring(0, (len - 1) / 2);
        String s2 = S.substring((len + 3) / 2 - 1);

        if(!isPalindrome(s1) || !isPalindrome(s2)){
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    }
    static boolean isPalindrome (String s) {
        int n = s.length();
        for (int i=0; i<n/2; i++) {
            if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
        }
        return true;
    }
} Main public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);

        final String S = sc.next();
        sc.close();
        int len = S.length();

        if(!isPalindrome(S)){
            System.out.println("No");
            return;
        }

        String s1 = S.substring(0, (len - 1) / 2);
        String s2 = S.substring((len + 3) / 2 - 1);

        if(!isPalindrome(s1) || !isPalindrome(s2)){
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    } main {
        final Scanner sc = new Scanner(System.in);

        final String S = sc.next();
        sc.close();
        int len = S.length();

        if(!isPalindrome(S)){
            System.out.println("No");
            return;
        }

        String s1 = S.substring(0, (len - 1) / 2);
        String s2 = S.substring((len + 3) / 2 - 1);

        if(!isPalindrome(s1) || !isPalindrome(s2)){
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final String S = sc.next(); S sc.next() sc.next sc sc.close() sc.close sc int len = S.length(); len S.length() S.length S if(!isPalindrome(S)){
            System.out.println("No");
            return;
        } !isPalindrome(S) isPalindrome(S) isPalindrome S {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; String s1 = S.substring(0, (len - 1) / 2); s1 S.substring(0, (len - 1) / 2) S.substring S 0 (len - 1) / 2 (len - 1) len 1 2 String s2 = S.substring((len + 3) / 2 - 1); s2 S.substring((len + 3) / 2 - 1) S.substring S (len + 3) / 2 - 1 (len + 3) / 2 (len + 3) len 3 2 1 if(!isPalindrome(s1) || !isPalindrome(s2)){
            System.out.println("No");
            return;
        } !isPalindrome(s1) || !isPalindrome(s2) !isPalindrome(s1) isPalindrome(s1) isPalindrome s1 !isPalindrome(s2) isPalindrome(s2) isPalindrome s2 {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" final String[] args args static boolean isPalindrome (String s) {
        int n = s.length();
        for (int i=0; i<n/2; i++) {
            if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
        }
        return true;
    } isPalindrome {
        int n = s.length();
        for (int i=0; i<n/2; i++) {
            if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
        }
        return true;
    } int n = s.length(); n s.length() s.length s for (int i=0; i<n/2; i++) {
            if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
        } int i=0; int i=0; i 0 i<n/2 i n/2 n 2 i++ i++ i {
            if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
        } {
            if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
        } if (s.charAt(i)!=s.charAt(n-i-1)) {return false;} s.charAt(i)!=s.charAt(n-i-1) s.charAt(i) s.charAt s i s.charAt(n-i-1) s.charAt s n-i-1 n-i-1 n i 1 {return false;} return false; false return true; true String s s public class Main {
    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);

        final String S = sc.next();
        sc.close();
        int len = S.length();

        if(!isPalindrome(S)){
            System.out.println("No");
            return;
        }

        String s1 = S.substring(0, (len - 1) / 2);
        String s2 = S.substring((len + 3) / 2 - 1);

        if(!isPalindrome(s1) || !isPalindrome(s2)){
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    }
    static boolean isPalindrome (String s) {
        int n = s.length();
        for (int i=0; i<n/2; i++) {
            if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
        }
        return true;
    }
} public class Main {
    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);

        final String S = sc.next();
        sc.close();
        int len = S.length();

        if(!isPalindrome(S)){
            System.out.println("No");
            return;
        }

        String s1 = S.substring(0, (len - 1) / 2);
        String s2 = S.substring((len + 3) / 2 - 1);

        if(!isPalindrome(s1) || !isPalindrome(s2)){
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    }
    static boolean isPalindrome (String s) {
        int n = s.length();
        for (int i=0; i<n/2; i++) {
            if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
        }
        return true;
    }
} Main
import java.util.*;

public class Main {
    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);

        final String S = sc.next();
        sc.close();
        int len = S.length();

        if(!isPalindrome(S)){
            System.out.println("No");
            return;
        }

        String s1 = S.substring(0, (len - 1) / 2);
        String s2 = S.substring((len + 3) / 2 - 1);

        if(!isPalindrome(s1) || !isPalindrome(s2)){
            System.out.println("No");
            return;
        }

        System.out.println("Yes");
    }
    static boolean isPalindrome (String s) {
        int n = s.length();
        for (int i=0; i<n/2; i++) {
            if (s.charAt(i)!=s.charAt(n-i-1)) {return false;}
        }
        return true;
    }
}