import java.util.*;
import java.io.*;
import java.math.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        char[] cl = s.toCharArray();
        int len = cl.length;
        for(int i = 0; i < len/2; i++){
            if(cl[i] != cl[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        char[] cl2 = s.substring(0,s.length()/2).toCharArray();
        len = cl2.length;
        for(int i = 0; i < len/2; i++){
            if(cl2[i] != cl2[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        char[] cl3 = s.substring((s.length()+2)/2,s.length()).toCharArray();
        len = cl3.length;
        for(int i = 0; i < len/2; i++){
            if(cl3[i] != cl3[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }

} import java.util.*; util.* java import java.io.*; io.* java import java.math.*; math.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        char[] cl = s.toCharArray();
        int len = cl.length;
        for(int i = 0; i < len/2; i++){
            if(cl[i] != cl[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        char[] cl2 = s.substring(0,s.length()/2).toCharArray();
        len = cl2.length;
        for(int i = 0; i < len/2; i++){
            if(cl2[i] != cl2[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        char[] cl3 = s.substring((s.length()+2)/2,s.length()).toCharArray();
        len = cl3.length;
        for(int i = 0; i < len/2; i++){
            if(cl3[i] != cl3[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }

} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        char[] cl = s.toCharArray();
        int len = cl.length;
        for(int i = 0; i < len/2; i++){
            if(cl[i] != cl[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        char[] cl2 = s.substring(0,s.length()/2).toCharArray();
        len = cl2.length;
        for(int i = 0; i < len/2; i++){
            if(cl2[i] != cl2[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        char[] cl3 = s.substring((s.length()+2)/2,s.length()).toCharArray();
        len = cl3.length;
        for(int i = 0; i < len/2; i++){
            if(cl3[i] != cl3[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        char[] cl = s.toCharArray();
        int len = cl.length;
        for(int i = 0; i < len/2; i++){
            if(cl[i] != cl[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        char[] cl2 = s.substring(0,s.length()/2).toCharArray();
        len = cl2.length;
        for(int i = 0; i < len/2; i++){
            if(cl2[i] != cl2[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        char[] cl3 = s.substring((s.length()+2)/2,s.length()).toCharArray();
        len = cl3.length;
        for(int i = 0; i < len/2; i++){
            if(cl3[i] != cl3[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc char[] cl = s.toCharArray(); cl s.toCharArray() s.toCharArray s int len = cl.length; len cl.length cl cl.length for(int i = 0; i < len/2; i++){
            if(cl[i] != cl[len-1-i]){
                System.out.println("No");
                return;
            }
        } int i = 0; int i = 0; i 0 i < len/2 i len/2 len 2 i++ i++ i {
            if(cl[i] != cl[len-1-i]){
                System.out.println("No");
                return;
            }
        } {
            if(cl[i] != cl[len-1-i]){
                System.out.println("No");
                return;
            }
        } if(cl[i] != cl[len-1-i]){
                System.out.println("No");
                return;
            } cl[i] != cl[len-1-i] cl[i] cl i cl[len-1-i] cl len-1-i len-1-i len 1 i {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; char[] cl2 = s.substring(0,s.length()/2).toCharArray(); cl2 s.substring(0,s.length()/2).toCharArray() s.substring(0,s.length()/2).toCharArray s.substring(0,s.length()/2) s.substring s 0 s.length()/2 s.length() s.length s 2 len = cl2.length len cl2.length cl2 cl2.length for(int i = 0; i < len/2; i++){
            if(cl2[i] != cl2[len-1-i]){
                System.out.println("No");
                return;
            }
        } int i = 0; int i = 0; i 0 i < len/2 i len/2 len 2 i++ i++ i {
            if(cl2[i] != cl2[len-1-i]){
                System.out.println("No");
                return;
            }
        } {
            if(cl2[i] != cl2[len-1-i]){
                System.out.println("No");
                return;
            }
        } if(cl2[i] != cl2[len-1-i]){
                System.out.println("No");
                return;
            } cl2[i] != cl2[len-1-i] cl2[i] cl2 i cl2[len-1-i] cl2 len-1-i len-1-i len 1 i {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; char[] cl3 = s.substring((s.length()+2)/2,s.length()).toCharArray(); cl3 s.substring((s.length()+2)/2,s.length()).toCharArray() s.substring((s.length()+2)/2,s.length()).toCharArray s.substring((s.length()+2)/2,s.length()) s.substring s (s.length()+2)/2 (s.length()+2) s.length() s.length s 2 2 s.length() s.length s len = cl3.length len cl3.length cl3 cl3.length for(int i = 0; i < len/2; i++){
            if(cl3[i] != cl3[len-1-i]){
                System.out.println("No");
                return;
            }
        } int i = 0; int i = 0; i 0 i < len/2 i len/2 len 2 i++ i++ i {
            if(cl3[i] != cl3[len-1-i]){
                System.out.println("No");
                return;
            }
        } {
            if(cl3[i] != cl3[len-1-i]){
                System.out.println("No");
                return;
            }
        } if(cl3[i] != cl3[len-1-i]){
                System.out.println("No");
                return;
            } cl3[i] != cl3[len-1-i] cl3[i] cl3 i cl3[len-1-i] cl3 len-1-i len-1-i len 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) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        char[] cl = s.toCharArray();
        int len = cl.length;
        for(int i = 0; i < len/2; i++){
            if(cl[i] != cl[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        char[] cl2 = s.substring(0,s.length()/2).toCharArray();
        len = cl2.length;
        for(int i = 0; i < len/2; i++){
            if(cl2[i] != cl2[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        char[] cl3 = s.substring((s.length()+2)/2,s.length()).toCharArray();
        len = cl3.length;
        for(int i = 0; i < len/2; i++){
            if(cl3[i] != cl3[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }

} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        char[] cl = s.toCharArray();
        int len = cl.length;
        for(int i = 0; i < len/2; i++){
            if(cl[i] != cl[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        char[] cl2 = s.substring(0,s.length()/2).toCharArray();
        len = cl2.length;
        for(int i = 0; i < len/2; i++){
            if(cl2[i] != cl2[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        char[] cl3 = s.substring((s.length()+2)/2,s.length()).toCharArray();
        len = cl3.length;
        for(int i = 0; i < len/2; i++){
            if(cl3[i] != cl3[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }

} Main
import java.util.*;
import java.io.*;
import java.math.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        char[] cl = s.toCharArray();
        int len = cl.length;
        for(int i = 0; i < len/2; i++){
            if(cl[i] != cl[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        char[] cl2 = s.substring(0,s.length()/2).toCharArray();
        len = cl2.length;
        for(int i = 0; i < len/2; i++){
            if(cl2[i] != cl2[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        char[] cl3 = s.substring((s.length()+2)/2,s.length()).toCharArray();
        len = cl3.length;
        for(int i = 0; i < len/2; i++){
            if(cl3[i] != cl3[len-1-i]){
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }

}