import java.util.Scanner;

public class Main {

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

        final StringBuilder S1 = new StringBuilder(sc.next());
        final int N = S1.length();
        final StringBuilder S2 = new StringBuilder(S1.substring(0, (N-1) / 2));
        final StringBuilder S3 = new StringBuilder(S1.substring((N+3)/2 - 1, N));

        final boolean cond1 = S1.toString().equals(S1.reverse().toString());
        final boolean cond2 = S2.toString().equals(S2.reverse().toString());
        final boolean cond3 = S3.toString().equals(S3.reverse().toString());

        if (cond1 && cond2 && cond3) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {

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

        final StringBuilder S1 = new StringBuilder(sc.next());
        final int N = S1.length();
        final StringBuilder S2 = new StringBuilder(S1.substring(0, (N-1) / 2));
        final StringBuilder S3 = new StringBuilder(S1.substring((N+3)/2 - 1, N));

        final boolean cond1 = S1.toString().equals(S1.reverse().toString());
        final boolean cond2 = S2.toString().equals(S2.reverse().toString());
        final boolean cond3 = S3.toString().equals(S3.reverse().toString());

        if (cond1 && cond2 && cond3) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        final StringBuilder S1 = new StringBuilder(sc.next());
        final int N = S1.length();
        final StringBuilder S2 = new StringBuilder(S1.substring(0, (N-1) / 2));
        final StringBuilder S3 = new StringBuilder(S1.substring((N+3)/2 - 1, N));

        final boolean cond1 = S1.toString().equals(S1.reverse().toString());
        final boolean cond2 = S2.toString().equals(S2.reverse().toString());
        final boolean cond3 = S3.toString().equals(S3.reverse().toString());

        if (cond1 && cond2 && cond3) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } main {
        final Scanner sc = new Scanner(System.in);

        final StringBuilder S1 = new StringBuilder(sc.next());
        final int N = S1.length();
        final StringBuilder S2 = new StringBuilder(S1.substring(0, (N-1) / 2));
        final StringBuilder S3 = new StringBuilder(S1.substring((N+3)/2 - 1, N));

        final boolean cond1 = S1.toString().equals(S1.reverse().toString());
        final boolean cond2 = S2.toString().equals(S2.reverse().toString());
        final boolean cond3 = S3.toString().equals(S3.reverse().toString());

        if (cond1 && cond2 && cond3) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final StringBuilder S1 = new StringBuilder(sc.next()); S1 new StringBuilder(sc.next()) final int N = S1.length(); N S1.length() S1.length S1 final StringBuilder S2 = new StringBuilder(S1.substring(0, (N-1) / 2)); S2 new StringBuilder(S1.substring(0, (N-1) / 2)) final StringBuilder S3 = new StringBuilder(S1.substring((N+3)/2 - 1, N)); S3 new StringBuilder(S1.substring((N+3)/2 - 1, N)) final boolean cond1 = S1.toString().equals(S1.reverse().toString()); cond1 S1.toString().equals(S1.reverse().toString()) S1.toString().equals S1.toString() S1.toString S1 S1.reverse().toString() S1.reverse().toString S1.reverse() S1.reverse S1 final boolean cond2 = S2.toString().equals(S2.reverse().toString()); cond2 S2.toString().equals(S2.reverse().toString()) S2.toString().equals S2.toString() S2.toString S2 S2.reverse().toString() S2.reverse().toString S2.reverse() S2.reverse S2 final boolean cond3 = S3.toString().equals(S3.reverse().toString()); cond3 S3.toString().equals(S3.reverse().toString()) S3.toString().equals S3.toString() S3.toString S3 S3.reverse().toString() S3.reverse().toString S3.reverse() S3.reverse S3 if (cond1 && cond2 && cond3) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } cond1 && cond2 && cond3 cond1 && cond2 && cond3 cond1 cond2 cond3 {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } 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) {
        final Scanner sc = new Scanner(System.in);

        final StringBuilder S1 = new StringBuilder(sc.next());
        final int N = S1.length();
        final StringBuilder S2 = new StringBuilder(S1.substring(0, (N-1) / 2));
        final StringBuilder S3 = new StringBuilder(S1.substring((N+3)/2 - 1, N));

        final boolean cond1 = S1.toString().equals(S1.reverse().toString());
        final boolean cond2 = S2.toString().equals(S2.reverse().toString());
        final boolean cond3 = S3.toString().equals(S3.reverse().toString());

        if (cond1 && cond2 && cond3) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} public class Main {

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

        final StringBuilder S1 = new StringBuilder(sc.next());
        final int N = S1.length();
        final StringBuilder S2 = new StringBuilder(S1.substring(0, (N-1) / 2));
        final StringBuilder S3 = new StringBuilder(S1.substring((N+3)/2 - 1, N));

        final boolean cond1 = S1.toString().equals(S1.reverse().toString());
        final boolean cond2 = S2.toString().equals(S2.reverse().toString());
        final boolean cond3 = S3.toString().equals(S3.reverse().toString());

        if (cond1 && cond2 && cond3) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main
import java.util.Scanner;

public class Main {

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

        final StringBuilder S1 = new StringBuilder(sc.next());
        final int N = S1.length();
        final StringBuilder S2 = new StringBuilder(S1.substring(0, (N-1) / 2));
        final StringBuilder S3 = new StringBuilder(S1.substring((N+3)/2 - 1, N));

        final boolean cond1 = S1.toString().equals(S1.reverse().toString());
        final boolean cond2 = S2.toString().equals(S2.reverse().toString());
        final boolean cond3 = S3.toString().equals(S3.reverse().toString());

        if (cond1 && cond2 && cond3) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}
