
import java.util.Scanner;

public class Main {

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

        char[] S = scanner.next().toCharArray();
        int N = S.length;

        int half = (N - 1) / 2;
        int quat = half / 2;

        // N = 11 half = (11 - 1)/2 = 5 quat = 5 / 2 = 2.5 = 2
        // N = 13 half = (13 - 1)/2 = 6 quat = 6 / 2 = 3

        for (int i = 0 ; i < half ; i++) {
            if (S[i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        }

        // 0 1 2 3 4 5 6 7 8 9 10
        // 0-4 6-10
        // 1-3 7-9

        for (int i = 0 ; i < quat ; i++) {
            if (S[i] != S[half - 1 - i] || S[half + 1 + i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");

        // akasaka Yes
        // level No
        //
    }
} import java.util.Scanner; Scanner java.util public class Main {

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

        char[] S = scanner.next().toCharArray();
        int N = S.length;

        int half = (N - 1) / 2;
        int quat = half / 2;

        // N = 11 half = (11 - 1)/2 = 5 quat = 5 / 2 = 2.5 = 2
        // N = 13 half = (13 - 1)/2 = 6 quat = 6 / 2 = 3

        for (int i = 0 ; i < half ; i++) {
            if (S[i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        }

        // 0 1 2 3 4 5 6 7 8 9 10
        // 0-4 6-10
        // 1-3 7-9

        for (int i = 0 ; i < quat ; i++) {
            if (S[i] != S[half - 1 - i] || S[half + 1 + i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");

        // akasaka Yes
        // level No
        //
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        char[] S = scanner.next().toCharArray();
        int N = S.length;

        int half = (N - 1) / 2;
        int quat = half / 2;

        // N = 11 half = (11 - 1)/2 = 5 quat = 5 / 2 = 2.5 = 2
        // N = 13 half = (13 - 1)/2 = 6 quat = 6 / 2 = 3

        for (int i = 0 ; i < half ; i++) {
            if (S[i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        }

        // 0 1 2 3 4 5 6 7 8 9 10
        // 0-4 6-10
        // 1-3 7-9

        for (int i = 0 ; i < quat ; i++) {
            if (S[i] != S[half - 1 - i] || S[half + 1 + i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");

        // akasaka Yes
        // level No
        //
    } main {
        Scanner scanner = new Scanner(System.in);

        char[] S = scanner.next().toCharArray();
        int N = S.length;

        int half = (N - 1) / 2;
        int quat = half / 2;

        // N = 11 half = (11 - 1)/2 = 5 quat = 5 / 2 = 2.5 = 2
        // N = 13 half = (13 - 1)/2 = 6 quat = 6 / 2 = 3

        for (int i = 0 ; i < half ; i++) {
            if (S[i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        }

        // 0 1 2 3 4 5 6 7 8 9 10
        // 0-4 6-10
        // 1-3 7-9

        for (int i = 0 ; i < quat ; i++) {
            if (S[i] != S[half - 1 - i] || S[half + 1 + i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");

        // akasaka Yes
        // level No
        //
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) char[] S = scanner.next().toCharArray(); S scanner.next().toCharArray() scanner.next().toCharArray scanner.next() scanner.next scanner int N = S.length; N S.length S S.length int half = (N - 1) / 2; half (N - 1) / 2 (N - 1) N 1 2 int quat = half / 2; quat half / 2 half 2 for (int i = 0 ; i < half ; i++) {
            if (S[i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        } int i = 0 ; int i = 0 ; i 0 i < half i half i++ i++ i {
            if (S[i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        } {
            if (S[i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        } if (S[i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            } S[i] != S[N - 1 - i] S[i] S i S[N - 1 - i] 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; for (int i = 0 ; i < quat ; i++) {
            if (S[i] != S[half - 1 - i] || S[half + 1 + i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        } int i = 0 ; int i = 0 ; i 0 i < quat i quat i++ i++ i {
            if (S[i] != S[half - 1 - i] || S[half + 1 + i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        } {
            if (S[i] != S[half - 1 - i] || S[half + 1 + i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        } if (S[i] != S[half - 1 - i] || S[half + 1 + i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            } S[i] != S[half - 1 - i] || S[half + 1 + i] != S[N - 1 - i] S[i] != S[half - 1 - i] S[i] S i S[half - 1 - i] S half - 1 - i half - 1 - i half 1 i S[half + 1 + i] != S[N - 1 - i] S[half + 1 + i] S half + 1 + i half + 1 + i half 1 i S[N - 1 - i] 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 scanner = new Scanner(System.in);

        char[] S = scanner.next().toCharArray();
        int N = S.length;

        int half = (N - 1) / 2;
        int quat = half / 2;

        // N = 11 half = (11 - 1)/2 = 5 quat = 5 / 2 = 2.5 = 2
        // N = 13 half = (13 - 1)/2 = 6 quat = 6 / 2 = 3

        for (int i = 0 ; i < half ; i++) {
            if (S[i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        }

        // 0 1 2 3 4 5 6 7 8 9 10
        // 0-4 6-10
        // 1-3 7-9

        for (int i = 0 ; i < quat ; i++) {
            if (S[i] != S[half - 1 - i] || S[half + 1 + i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");

        // akasaka Yes
        // level No
        //
    }
} public class Main {

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

        char[] S = scanner.next().toCharArray();
        int N = S.length;

        int half = (N - 1) / 2;
        int quat = half / 2;

        // N = 11 half = (11 - 1)/2 = 5 quat = 5 / 2 = 2.5 = 2
        // N = 13 half = (13 - 1)/2 = 6 quat = 6 / 2 = 3

        for (int i = 0 ; i < half ; i++) {
            if (S[i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        }

        // 0 1 2 3 4 5 6 7 8 9 10
        // 0-4 6-10
        // 1-3 7-9

        for (int i = 0 ; i < quat ; i++) {
            if (S[i] != S[half - 1 - i] || S[half + 1 + i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");

        // akasaka Yes
        // level No
        //
    }
} Main

import java.util.Scanner;

public class Main {

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

        char[] S = scanner.next().toCharArray();
        int N = S.length;

        int half = (N - 1) / 2;
        int quat = half / 2;

        // N = 11 half = (11 - 1)/2 = 5 quat = 5 / 2 = 2.5 = 2
        // N = 13 half = (13 - 1)/2 = 6 quat = 6 / 2 = 3

        for (int i = 0 ; i < half ; i++) {
            if (S[i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        }

        // 0 1 2 3 4 5 6 7 8 9 10
        // 0-4 6-10
        // 1-3 7-9

        for (int i = 0 ; i < quat ; i++) {
            if (S[i] != S[half - 1 - i] || S[half + 1 + i] != S[N - 1 - i]) {
                System.out.println("No");
                return;
            }
        }

        System.out.println("Yes");

        // akasaka Yes
        // level No
        //
    }
}
