import java.util.Scanner;

public class Main {
    public static boolean palindrome(String s) {
        StringBuffer sb = new StringBuffer(s);

        return s.equals(sb.reverse().toString());
    }

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

        if (palindrome(s) && palindrome(s.substring(0, (s.length() -1)/2)) && palindrome(s.substring((s.length() + 3)/2 -1))) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static boolean palindrome(String s) {
        StringBuffer sb = new StringBuffer(s);

        return s.equals(sb.reverse().toString());
    }

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

        if (palindrome(s) && palindrome(s.substring(0, (s.length() -1)/2)) && palindrome(s.substring((s.length() + 3)/2 -1))) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main public static boolean palindrome(String s) {
        StringBuffer sb = new StringBuffer(s);

        return s.equals(sb.reverse().toString());
    } palindrome {
        StringBuffer sb = new StringBuffer(s);

        return s.equals(sb.reverse().toString());
    } StringBuffer sb = new StringBuffer(s); sb new StringBuffer(s) return s.equals(sb.reverse().toString()); s.equals(sb.reverse().toString()) s.equals s sb.reverse().toString() sb.reverse().toString sb.reverse() sb.reverse sb String s s public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        if (palindrome(s) && palindrome(s.substring(0, (s.length() -1)/2)) && palindrome(s.substring((s.length() + 3)/2 -1))) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        if (palindrome(s) && palindrome(s.substring(0, (s.length() -1)/2)) && palindrome(s.substring((s.length() + 3)/2 -1))) {
            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 if (palindrome(s) && palindrome(s.substring(0, (s.length() -1)/2)) && palindrome(s.substring((s.length() + 3)/2 -1))) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } palindrome(s) && palindrome(s.substring(0, (s.length() -1)/2)) && palindrome(s.substring((s.length() + 3)/2 -1)) palindrome(s) && palindrome(s.substring(0, (s.length() -1)/2)) && palindrome(s.substring((s.length() + 3)/2 -1)) palindrome(s) palindrome s palindrome(s.substring(0, (s.length() -1)/2)) palindrome s.substring(0, (s.length() -1)/2) s.substring s 0 (s.length() -1)/2 (s.length() -1) s.length() s.length s 1 2 palindrome(s.substring((s.length() + 3)/2 -1)) palindrome s.substring((s.length() + 3)/2 -1) s.substring s (s.length() + 3)/2 -1 (s.length() + 3)/2 (s.length() + 3) s.length() s.length s 3 2 1 {
            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 boolean palindrome(String s) {
        StringBuffer sb = new StringBuffer(s);

        return s.equals(sb.reverse().toString());
    }

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

        if (palindrome(s) && palindrome(s.substring(0, (s.length() -1)/2)) && palindrome(s.substring((s.length() + 3)/2 -1))) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} public class Main {
    public static boolean palindrome(String s) {
        StringBuffer sb = new StringBuffer(s);

        return s.equals(sb.reverse().toString());
    }

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

        if (palindrome(s) && palindrome(s.substring(0, (s.length() -1)/2)) && palindrome(s.substring((s.length() + 3)/2 -1))) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static boolean palindrome(String s) {
        StringBuffer sb = new StringBuffer(s);

        return s.equals(sb.reverse().toString());
    }

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

        if (palindrome(s) && palindrome(s.substring(0, (s.length() -1)/2)) && palindrome(s.substring((s.length() + 3)/2 -1))) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}
