import java.math.BigInteger;
import java.util.*;
import java.io.*;

public class Main {

    private static boolean checkP(String s, int start, int end) {
        int sum = start + end, limit = (sum % 2 == 0) ? ((sum / 2) - 1) : ((sum / 2));
        for(int i = start, j = end; i <= limit; i++, --j) {
            if(s.charAt(i) != s.charAt(j)) return false;
        }
        return true;
    }

    private static boolean checkP(String s) {
        return new StringBuilder(s).reverse().toString().equals(s);
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        int N = s.length();
        String first = s.substring(0, ((N - 1)/2));
        String second = s.substring(((N + 3)/2) - 1, N);
        boolean flag = checkP(first) && checkP(second) && checkP(s);
        System.out.println(flag ? "Yes" : "No");
    }
} import java.math.BigInteger; BigInteger java.math import java.util.*; util.* java import java.io.*; io.* java public class Main {

    private static boolean checkP(String s, int start, int end) {
        int sum = start + end, limit = (sum % 2 == 0) ? ((sum / 2) - 1) : ((sum / 2));
        for(int i = start, j = end; i <= limit; i++, --j) {
            if(s.charAt(i) != s.charAt(j)) return false;
        }
        return true;
    }

    private static boolean checkP(String s) {
        return new StringBuilder(s).reverse().toString().equals(s);
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        int N = s.length();
        String first = s.substring(0, ((N - 1)/2));
        String second = s.substring(((N + 3)/2) - 1, N);
        boolean flag = checkP(first) && checkP(second) && checkP(s);
        System.out.println(flag ? "Yes" : "No");
    }
} Main private static boolean checkP(String s, int start, int end) {
        int sum = start + end, limit = (sum % 2 == 0) ? ((sum / 2) - 1) : ((sum / 2));
        for(int i = start, j = end; i <= limit; i++, --j) {
            if(s.charAt(i) != s.charAt(j)) return false;
        }
        return true;
    } checkP {
        int sum = start + end, limit = (sum % 2 == 0) ? ((sum / 2) - 1) : ((sum / 2));
        for(int i = start, j = end; i <= limit; i++, --j) {
            if(s.charAt(i) != s.charAt(j)) return false;
        }
        return true;
    } int sum = start + end sum start + end start end limit = (sum % 2 == 0) ? ((sum / 2) - 1) : ((sum / 2)); limit (sum % 2 == 0) ? ((sum / 2) - 1) : ((sum / 2)) (sum % 2 == 0) sum % 2 sum 2 0 ((sum / 2) - 1) (sum / 2) sum 2 1 ((sum / 2)) sum 2 for(int i = start, j = end; i <= limit; i++, --j) {
            if(s.charAt(i) != s.charAt(j)) return false;
        } int i = start, j = end; int i = start i start j = end; j end i <= limit i limit i++, --j i++ i --j j {
            if(s.charAt(i) != s.charAt(j)) return false;
        } {
            if(s.charAt(i) != s.charAt(j)) return false;
        } if(s.charAt(i) != s.charAt(j)) return false; s.charAt(i) != s.charAt(j) s.charAt(i) s.charAt s i s.charAt(j) s.charAt s j return false; false return true; true String s s int start start int end end private static boolean checkP(String s) {
        return new StringBuilder(s).reverse().toString().equals(s);
    } checkP {
        return new StringBuilder(s).reverse().toString().equals(s);
    } return new StringBuilder(s).reverse().toString().equals(s); new StringBuilder(s).reverse().toString().equals(s) new StringBuilder(s).reverse().toString().equals new StringBuilder(s).reverse().toString() new StringBuilder(s).reverse().toString new StringBuilder(s).reverse() new StringBuilder(s).reverse new StringBuilder(s) s String s s public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        int N = s.length();
        String first = s.substring(0, ((N - 1)/2));
        String second = s.substring(((N + 3)/2) - 1, N);
        boolean flag = checkP(first) && checkP(second) && checkP(s);
        System.out.println(flag ? "Yes" : "No");
    } main {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        int N = s.length();
        String first = s.substring(0, ((N - 1)/2));
        String second = s.substring(((N + 3)/2) - 1, N);
        boolean flag = checkP(first) && checkP(second) && checkP(s);
        System.out.println(flag ? "Yes" : "No");
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) String s = in.next(); s in.next() in.next in int N = s.length(); N s.length() s.length s String first = s.substring(0, ((N - 1)/2)); first s.substring(0, ((N - 1)/2)) s.substring s 0 ((N - 1)/2) (N - 1) N 1 2 String second = s.substring(((N + 3)/2) - 1, N); second s.substring(((N + 3)/2) - 1, N) s.substring s ((N + 3)/2) - 1 ((N + 3)/2) (N + 3) N 3 2 1 N boolean flag = checkP(first) && checkP(second) && checkP(s); flag checkP(first) && checkP(second) && checkP(s) checkP(first) && checkP(second) && checkP(s) checkP(first) checkP first checkP(second) checkP second checkP(s) checkP s System.out.println(flag ? "Yes" : "No") System.out.println System.out System System.out flag ? "Yes" : "No" flag "Yes" "No" String[] args args public class Main {

    private static boolean checkP(String s, int start, int end) {
        int sum = start + end, limit = (sum % 2 == 0) ? ((sum / 2) - 1) : ((sum / 2));
        for(int i = start, j = end; i <= limit; i++, --j) {
            if(s.charAt(i) != s.charAt(j)) return false;
        }
        return true;
    }

    private static boolean checkP(String s) {
        return new StringBuilder(s).reverse().toString().equals(s);
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        int N = s.length();
        String first = s.substring(0, ((N - 1)/2));
        String second = s.substring(((N + 3)/2) - 1, N);
        boolean flag = checkP(first) && checkP(second) && checkP(s);
        System.out.println(flag ? "Yes" : "No");
    }
} public class Main {

    private static boolean checkP(String s, int start, int end) {
        int sum = start + end, limit = (sum % 2 == 0) ? ((sum / 2) - 1) : ((sum / 2));
        for(int i = start, j = end; i <= limit; i++, --j) {
            if(s.charAt(i) != s.charAt(j)) return false;
        }
        return true;
    }

    private static boolean checkP(String s) {
        return new StringBuilder(s).reverse().toString().equals(s);
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        int N = s.length();
        String first = s.substring(0, ((N - 1)/2));
        String second = s.substring(((N + 3)/2) - 1, N);
        boolean flag = checkP(first) && checkP(second) && checkP(s);
        System.out.println(flag ? "Yes" : "No");
    }
} Main
import java.math.BigInteger;
import java.util.*;
import java.io.*;

public class Main {

    private static boolean checkP(String s, int start, int end) {
        int sum = start + end, limit = (sum % 2 == 0) ? ((sum / 2) - 1) : ((sum / 2));
        for(int i = start, j = end; i <= limit; i++, --j) {
            if(s.charAt(i) != s.charAt(j)) return false;
        }
        return true;
    }

    private static boolean checkP(String s) {
        return new StringBuilder(s).reverse().toString().equals(s);
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        int N = s.length();
        String first = s.substring(0, ((N - 1)/2));
        String second = s.substring(((N + 3)/2) - 1, N);
        boolean flag = checkP(first) && checkP(second) && checkP(s);
        System.out.println(flag ? "Yes" : "No");
    }
}