import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] charArr = str.toCharArray();
        for (int i = 0; i < charArr.length; i++){
            if (charArr[i] != charArr[charArr.length - 1 - i]){
                System.out.println("No");
                return;
            }
        }
        for (int j = 0; j <= (charArr.length - 2) / 2; j++){
            if (charArr[j] != charArr[(charArr.length - 2) / 2 - j]){
                System.out.println("No");
                return;
            }
        }
        int count = 0;
        for (int k = (charArr.length + 3) / 2 - 1; k < charArr.length; k++){
            if (k == charArr.length - 1 - count){
                break;
            }
            if (charArr[k] != charArr[charArr.length - 1 - count]){
                System.out.println("No");
                return;
            }
            count++;
        }
        System.out.println("Yes");
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] charArr = str.toCharArray();
        for (int i = 0; i < charArr.length; i++){
            if (charArr[i] != charArr[charArr.length - 1 - i]){
                System.out.println("No");
                return;
            }
        }
        for (int j = 0; j <= (charArr.length - 2) / 2; j++){
            if (charArr[j] != charArr[(charArr.length - 2) / 2 - j]){
                System.out.println("No");
                return;
            }
        }
        int count = 0;
        for (int k = (charArr.length + 3) / 2 - 1; k < charArr.length; k++){
            if (k == charArr.length - 1 - count){
                break;
            }
            if (charArr[k] != charArr[charArr.length - 1 - count]){
                System.out.println("No");
                return;
            }
            count++;
        }
        System.out.println("Yes");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] charArr = str.toCharArray();
        for (int i = 0; i < charArr.length; i++){
            if (charArr[i] != charArr[charArr.length - 1 - i]){
                System.out.println("No");
                return;
            }
        }
        for (int j = 0; j <= (charArr.length - 2) / 2; j++){
            if (charArr[j] != charArr[(charArr.length - 2) / 2 - j]){
                System.out.println("No");
                return;
            }
        }
        int count = 0;
        for (int k = (charArr.length + 3) / 2 - 1; k < charArr.length; k++){
            if (k == charArr.length - 1 - count){
                break;
            }
            if (charArr[k] != charArr[charArr.length - 1 - count]){
                System.out.println("No");
                return;
            }
            count++;
        }
        System.out.println("Yes");
    } main {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] charArr = str.toCharArray();
        for (int i = 0; i < charArr.length; i++){
            if (charArr[i] != charArr[charArr.length - 1 - i]){
                System.out.println("No");
                return;
            }
        }
        for (int j = 0; j <= (charArr.length - 2) / 2; j++){
            if (charArr[j] != charArr[(charArr.length - 2) / 2 - j]){
                System.out.println("No");
                return;
            }
        }
        int count = 0;
        for (int k = (charArr.length + 3) / 2 - 1; k < charArr.length; k++){
            if (k == charArr.length - 1 - count){
                break;
            }
            if (charArr[k] != charArr[charArr.length - 1 - count]){
                System.out.println("No");
                return;
            }
            count++;
        }
        System.out.println("Yes");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc char[] charArr = str.toCharArray(); charArr str.toCharArray() str.toCharArray str for (int i = 0; i < charArr.length; i++){
            if (charArr[i] != charArr[charArr.length - 1 - i]){
                System.out.println("No");
                return;
            }
        } int i = 0; int i = 0; i 0 i < charArr.length i charArr.length charArr charArr.length i++ i++ i {
            if (charArr[i] != charArr[charArr.length - 1 - i]){
                System.out.println("No");
                return;
            }
        } {
            if (charArr[i] != charArr[charArr.length - 1 - i]){
                System.out.println("No");
                return;
            }
        } if (charArr[i] != charArr[charArr.length - 1 - i]){
                System.out.println("No");
                return;
            } charArr[i] != charArr[charArr.length - 1 - i] charArr[i] charArr i charArr[charArr.length - 1 - i] charArr charArr.length - 1 - i charArr.length - 1 - i charArr.length charArr charArr.length 1 i {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; for (int j = 0; j <= (charArr.length - 2) / 2; j++){
            if (charArr[j] != charArr[(charArr.length - 2) / 2 - j]){
                System.out.println("No");
                return;
            }
        } int j = 0; int j = 0; j 0 j <= (charArr.length - 2) / 2 j (charArr.length - 2) / 2 (charArr.length - 2) charArr.length charArr charArr.length 2 2 j++ j++ j {
            if (charArr[j] != charArr[(charArr.length - 2) / 2 - j]){
                System.out.println("No");
                return;
            }
        } {
            if (charArr[j] != charArr[(charArr.length - 2) / 2 - j]){
                System.out.println("No");
                return;
            }
        } if (charArr[j] != charArr[(charArr.length - 2) / 2 - j]){
                System.out.println("No");
                return;
            } charArr[j] != charArr[(charArr.length - 2) / 2 - j] charArr[j] charArr j charArr[(charArr.length - 2) / 2 - j] charArr (charArr.length - 2) / 2 - j (charArr.length - 2) / 2 (charArr.length - 2) charArr.length charArr charArr.length 2 2 j {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; int count = 0; count 0 for (int k = (charArr.length + 3) / 2 - 1; k < charArr.length; k++){
            if (k == charArr.length - 1 - count){
                break;
            }
            if (charArr[k] != charArr[charArr.length - 1 - count]){
                System.out.println("No");
                return;
            }
            count++;
        } int k = (charArr.length + 3) / 2 - 1; int k = (charArr.length + 3) / 2 - 1; k (charArr.length + 3) / 2 - 1 (charArr.length + 3) / 2 (charArr.length + 3) charArr.length charArr charArr.length 3 2 1 k < charArr.length k charArr.length charArr charArr.length k++ k++ k {
            if (k == charArr.length - 1 - count){
                break;
            }
            if (charArr[k] != charArr[charArr.length - 1 - count]){
                System.out.println("No");
                return;
            }
            count++;
        } {
            if (k == charArr.length - 1 - count){
                break;
            }
            if (charArr[k] != charArr[charArr.length - 1 - count]){
                System.out.println("No");
                return;
            }
            count++;
        } if (k == charArr.length - 1 - count){
                break;
            } k == charArr.length - 1 - count k charArr.length - 1 - count charArr.length - 1 - count charArr.length charArr charArr.length 1 count {
                break;
            } break; if (charArr[k] != charArr[charArr.length - 1 - count]){
                System.out.println("No");
                return;
            } charArr[k] != charArr[charArr.length - 1 - count] charArr[k] charArr k charArr[charArr.length - 1 - count] charArr charArr.length - 1 - count charArr.length - 1 - count charArr.length charArr charArr.length 1 count {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; count++ count 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 sc = new Scanner(System.in);
        String str = sc.next();
        char[] charArr = str.toCharArray();
        for (int i = 0; i < charArr.length; i++){
            if (charArr[i] != charArr[charArr.length - 1 - i]){
                System.out.println("No");
                return;
            }
        }
        for (int j = 0; j <= (charArr.length - 2) / 2; j++){
            if (charArr[j] != charArr[(charArr.length - 2) / 2 - j]){
                System.out.println("No");
                return;
            }
        }
        int count = 0;
        for (int k = (charArr.length + 3) / 2 - 1; k < charArr.length; k++){
            if (k == charArr.length - 1 - count){
                break;
            }
            if (charArr[k] != charArr[charArr.length - 1 - count]){
                System.out.println("No");
                return;
            }
            count++;
        }
        System.out.println("Yes");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] charArr = str.toCharArray();
        for (int i = 0; i < charArr.length; i++){
            if (charArr[i] != charArr[charArr.length - 1 - i]){
                System.out.println("No");
                return;
            }
        }
        for (int j = 0; j <= (charArr.length - 2) / 2; j++){
            if (charArr[j] != charArr[(charArr.length - 2) / 2 - j]){
                System.out.println("No");
                return;
            }
        }
        int count = 0;
        for (int k = (charArr.length + 3) / 2 - 1; k < charArr.length; k++){
            if (k == charArr.length - 1 - count){
                break;
            }
            if (charArr[k] != charArr[charArr.length - 1 - count]){
                System.out.println("No");
                return;
            }
            count++;
        }
        System.out.println("Yes");
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        char[] charArr = str.toCharArray();
        for (int i = 0; i < charArr.length; i++){
            if (charArr[i] != charArr[charArr.length - 1 - i]){
                System.out.println("No");
                return;
            }
        }
        for (int j = 0; j <= (charArr.length - 2) / 2; j++){
            if (charArr[j] != charArr[(charArr.length - 2) / 2 - j]){
                System.out.println("No");
                return;
            }
        }
        int count = 0;
        for (int k = (charArr.length + 3) / 2 - 1; k < charArr.length; k++){
            if (k == charArr.length - 1 - count){
                break;
            }
            if (charArr[k] != charArr[charArr.length - 1 - count]){
                System.out.println("No");
                return;
            }
            count++;
        }
        System.out.println("Yes");
    }
}
