import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();
        boolean res = true;
        int n = s.length();
        for (int i = 0; i < (n-1)/2; i++) {
            if (s.charAt(i) != s.charAt(n - i - 1)) res = false;
        }
        for (int i = 0; i < (n-1)/4; i++) {
            if (s.charAt(i) != s.charAt((n - 1) / 2 - 1 - i)) res = false;
            if (s.charAt((n + 1) / 2 + i) != s.charAt(n - 1 - i)) res = false;
        }        

        if (res) System.out.println("Yes");
        else System.out.println("No");

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

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();
        boolean res = true;
        int n = s.length();
        for (int i = 0; i < (n-1)/2; i++) {
            if (s.charAt(i) != s.charAt(n - i - 1)) res = false;
        }
        for (int i = 0; i < (n-1)/4; i++) {
            if (s.charAt(i) != s.charAt((n - 1) / 2 - 1 - i)) res = false;
            if (s.charAt((n + 1) / 2 + i) != s.charAt(n - 1 - i)) res = false;
        }        

        if (res) System.out.println("Yes");
        else System.out.println("No");

    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();
        boolean res = true;
        int n = s.length();
        for (int i = 0; i < (n-1)/2; i++) {
            if (s.charAt(i) != s.charAt(n - i - 1)) res = false;
        }
        for (int i = 0; i < (n-1)/4; i++) {
            if (s.charAt(i) != s.charAt((n - 1) / 2 - 1 - i)) res = false;
            if (s.charAt((n + 1) / 2 + i) != s.charAt(n - 1 - i)) res = false;
        }        

        if (res) System.out.println("Yes");
        else System.out.println("No");

    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();
        boolean res = true;
        int n = s.length();
        for (int i = 0; i < (n-1)/2; i++) {
            if (s.charAt(i) != s.charAt(n - i - 1)) res = false;
        }
        for (int i = 0; i < (n-1)/4; i++) {
            if (s.charAt(i) != s.charAt((n - 1) / 2 - 1 - i)) res = false;
            if (s.charAt((n + 1) / 2 + i) != s.charAt(n - 1 - i)) res = false;
        }        

        if (res) System.out.println("Yes");
        else System.out.println("No");

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc sc.close() sc.close sc boolean res = true; res true 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)) res = false;
        } 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)) res = false;
        } {
            if (s.charAt(i) != s.charAt(n - i - 1)) res = false;
        } if (s.charAt(i) != s.charAt(n - i - 1)) res = 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 res = false res false for (int i = 0; i < (n-1)/4; i++) {
            if (s.charAt(i) != s.charAt((n - 1) / 2 - 1 - i)) res = false;
            if (s.charAt((n + 1) / 2 + i) != s.charAt(n - 1 - i)) res = false;
        } 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)) res = false;
            if (s.charAt((n + 1) / 2 + i) != s.charAt(n - 1 - i)) res = false;
        } {
            if (s.charAt(i) != s.charAt((n - 1) / 2 - 1 - i)) res = false;
            if (s.charAt((n + 1) / 2 + i) != s.charAt(n - 1 - i)) res = false;
        } if (s.charAt(i) != s.charAt((n - 1) / 2 - 1 - i)) res = false; 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 res = false res false if (s.charAt((n + 1) / 2 + i) != s.charAt(n - 1 - i)) res = false; 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 res = false res false if (res) System.out.println("Yes");
        else System.out.println("No"); res System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();
        boolean res = true;
        int n = s.length();
        for (int i = 0; i < (n-1)/2; i++) {
            if (s.charAt(i) != s.charAt(n - i - 1)) res = false;
        }
        for (int i = 0; i < (n-1)/4; i++) {
            if (s.charAt(i) != s.charAt((n - 1) / 2 - 1 - i)) res = false;
            if (s.charAt((n + 1) / 2 + i) != s.charAt(n - 1 - i)) res = false;
        }        

        if (res) System.out.println("Yes");
        else System.out.println("No");

    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();
        boolean res = true;
        int n = s.length();
        for (int i = 0; i < (n-1)/2; i++) {
            if (s.charAt(i) != s.charAt(n - i - 1)) res = false;
        }
        for (int i = 0; i < (n-1)/4; i++) {
            if (s.charAt(i) != s.charAt((n - 1) / 2 - 1 - i)) res = false;
            if (s.charAt((n + 1) / 2 + i) != s.charAt(n - 1 - i)) res = false;
        }        

        if (res) System.out.println("Yes");
        else System.out.println("No");

    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();
        boolean res = true;
        int n = s.length();
        for (int i = 0; i < (n-1)/2; i++) {
            if (s.charAt(i) != s.charAt(n - i - 1)) res = false;
        }
        for (int i = 0; i < (n-1)/4; i++) {
            if (s.charAt(i) != s.charAt((n - 1) / 2 - 1 - i)) res = false;
            if (s.charAt((n + 1) / 2 + i) != s.charAt(n - 1 - i)) res = false;
        }        

        if (res) System.out.println("Yes");
        else System.out.println("No");

    }
}