import java.util.*;
public class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        String S = stdIn.next();
        stdIn.close();

        int n = S.length();

        for (int i = 0; i < (n - 1) / 2; i++) {
            if (S.charAt(i) != S.charAt(n - i - 1)) {
                System.out.println("No");
                return;
            }
        }

        for (int i = 0; i < (n - 1) / 4; i++) {
            if (S.charAt(i) != S.charAt((n - 1) / 2 - 1 - i)) {
                System.out.println("No");
                return;
            }
        }

        for (int i = 0 ; i < (n - 1) / 4; i++) {
            if (S.charAt((n + 1) / 2 + i) != S.charAt(n - 1 - i)) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");

    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        String S = stdIn.next();
        stdIn.close();

        int n = S.length();

        for (int i = 0; i < (n - 1) / 2; i++) {
            if (S.charAt(i) != S.charAt(n - i - 1)) {
                System.out.println("No");
                return;
            }
        }

        for (int i = 0; i < (n - 1) / 4; i++) {
            if (S.charAt(i) != S.charAt((n - 1) / 2 - 1 - i)) {
                System.out.println("No");
                return;
            }
        }

        for (int i = 0 ; i < (n - 1) / 4; i++) {
            if (S.charAt((n + 1) / 2 + i) != S.charAt(n - 1 - i)) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");

    }
} Main public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        String S = stdIn.next();
        stdIn.close();

        int n = S.length();

        for (int i = 0; i < (n - 1) / 2; i++) {
            if (S.charAt(i) != S.charAt(n - i - 1)) {
                System.out.println("No");
                return;
            }
        }

        for (int i = 0; i < (n - 1) / 4; i++) {
            if (S.charAt(i) != S.charAt((n - 1) / 2 - 1 - i)) {
                System.out.println("No");
                return;
            }
        }

        for (int i = 0 ; i < (n - 1) / 4; i++) {
            if (S.charAt((n + 1) / 2 + i) != S.charAt(n - 1 - i)) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");

    } main {
        Scanner stdIn = new Scanner(System.in);
        String S = stdIn.next();
        stdIn.close();

        int n = S.length();

        for (int i = 0; i < (n - 1) / 2; i++) {
            if (S.charAt(i) != S.charAt(n - i - 1)) {
                System.out.println("No");
                return;
            }
        }

        for (int i = 0; i < (n - 1) / 4; i++) {
            if (S.charAt(i) != S.charAt((n - 1) / 2 - 1 - i)) {
                System.out.println("No");
                return;
            }
        }

        for (int i = 0 ; i < (n - 1) / 4; i++) {
            if (S.charAt((n + 1) / 2 + i) != S.charAt(n - 1 - i)) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");

    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) String S = stdIn.next(); S stdIn.next() stdIn.next stdIn stdIn.close() stdIn.close stdIn int n = S.length(); n S.length() S.length S for (int i = 0; i < (n - 1) / 2; i++) {
            if (S.charAt(i) != S.charAt(n - i - 1)) {
                System.out.println("No");
                return;
            }
        } int i = 0; int i = 0; i 0 i < (n - 1) / 2 i (n - 1) / 2 (n - 1) n 1 2 i++ i++ i {
            if (S.charAt(i) != S.charAt(n - i - 1)) {
                System.out.println("No");
                return;
            }
        } {
            if (S.charAt(i) != S.charAt(n - i - 1)) {
                System.out.println("No");
                return;
            }
        } if (S.charAt(i) != S.charAt(n - i - 1)) {
                System.out.println("No");
                return;
            } 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 {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; for (int i = 0; i < (n - 1) / 4; i++) {
            if (S.charAt(i) != S.charAt((n - 1) / 2 - 1 - i)) {
                System.out.println("No");
                return;
            }
        } int i = 0; int i = 0; i 0 i < (n - 1) / 4 i (n - 1) / 4 (n - 1) n 1 4 i++ i++ i {
            if (S.charAt(i) != S.charAt((n - 1) / 2 - 1 - i)) {
                System.out.println("No");
                return;
            }
        } {
            if (S.charAt(i) != S.charAt((n - 1) / 2 - 1 - i)) {
                System.out.println("No");
                return;
            }
        } if (S.charAt(i) != S.charAt((n - 1) / 2 - 1 - i)) {
                System.out.println("No");
                return;
            } S.charAt(i) != S.charAt((n - 1) / 2 - 1 - i) S.charAt(i) S.charAt S i S.charAt((n - 1) / 2 - 1 - i) S.charAt S (n - 1) / 2 - 1 - i (n - 1) / 2 - 1 - i (n - 1) / 2 (n - 1) n 1 2 1 i {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; for (int i = 0 ; i < (n - 1) / 4; i++) {
            if (S.charAt((n + 1) / 2 + i) != S.charAt(n - 1 - i)) {
                System.out.println("No");
                return;
            }
        } int i = 0 ; int i = 0 ; i 0 i < (n - 1) / 4 i (n - 1) / 4 (n - 1) n 1 4 i++ i++ i {
            if (S.charAt((n + 1) / 2 + i) != S.charAt(n - 1 - i)) {
                System.out.println("No");
                return;
            }
        } {
            if (S.charAt((n + 1) / 2 + i) != S.charAt(n - 1 - i)) {
                System.out.println("No");
                return;
            }
        } if (S.charAt((n + 1) / 2 + i) != S.charAt(n - 1 - i)) {
                System.out.println("No");
                return;
            } S.charAt((n + 1) / 2 + i) != S.charAt(n - 1 - i) S.charAt((n + 1) / 2 + i) S.charAt S (n + 1) / 2 + i (n + 1) / 2 (n + 1) n 1 2 i S.charAt(n - 1 - i) S.charAt S n - 1 - i n - 1 - i n 1 i {
                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" String[] args args public class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        String S = stdIn.next();
        stdIn.close();

        int n = S.length();

        for (int i = 0; i < (n - 1) / 2; i++) {
            if (S.charAt(i) != S.charAt(n - i - 1)) {
                System.out.println("No");
                return;
            }
        }

        for (int i = 0; i < (n - 1) / 4; i++) {
            if (S.charAt(i) != S.charAt((n - 1) / 2 - 1 - i)) {
                System.out.println("No");
                return;
            }
        }

        for (int i = 0 ; i < (n - 1) / 4; i++) {
            if (S.charAt((n + 1) / 2 + i) != S.charAt(n - 1 - i)) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");

    }
} public class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        String S = stdIn.next();
        stdIn.close();

        int n = S.length();

        for (int i = 0; i < (n - 1) / 2; i++) {
            if (S.charAt(i) != S.charAt(n - i - 1)) {
                System.out.println("No");
                return;
            }
        }

        for (int i = 0; i < (n - 1) / 4; i++) {
            if (S.charAt(i) != S.charAt((n - 1) / 2 - 1 - i)) {
                System.out.println("No");
                return;
            }
        }

        for (int i = 0 ; i < (n - 1) / 4; i++) {
            if (S.charAt((n + 1) / 2 + i) != S.charAt(n - 1 - i)) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");

    }
} Main
import java.util.*;
public class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        String S = stdIn.next();
        stdIn.close();

        int n = S.length();

        for (int i = 0; i < (n - 1) / 2; i++) {
            if (S.charAt(i) != S.charAt(n - i - 1)) {
                System.out.println("No");
                return;
            }
        }

        for (int i = 0; i < (n - 1) / 4; i++) {
            if (S.charAt(i) != S.charAt((n - 1) / 2 - 1 - i)) {
                System.out.println("No");
                return;
            }
        }

        for (int i = 0 ; i < (n - 1) / 4; i++) {
            if (S.charAt((n + 1) / 2 + i) != S.charAt(n - 1 - i)) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");

    }
}