import java.io.*;
public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String S = br.readLine();
        int len = S.length();

        String temp1 = new StringBuilder(S).reverse().toString();
        String sub1 = S.substring(0,(len-1)/2);
        String temp2 = new StringBuffer(sub1).reverse().toString();
        String sub2 = S.substring(((len+3)/2)-1, len);
        String temp3 = new StringBuffer(sub2).reverse().toString();

        if(S.equals(temp1) && sub1.equals(temp2) && sub2.equals(temp3)) {
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} import java.io.*; io.* java public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String S = br.readLine();
        int len = S.length();

        String temp1 = new StringBuilder(S).reverse().toString();
        String sub1 = S.substring(0,(len-1)/2);
        String temp2 = new StringBuffer(sub1).reverse().toString();
        String sub2 = S.substring(((len+3)/2)-1, len);
        String temp3 = new StringBuffer(sub2).reverse().toString();

        if(S.equals(temp1) && sub1.equals(temp2) && sub2.equals(temp3)) {
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} Main public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String S = br.readLine();
        int len = S.length();

        String temp1 = new StringBuilder(S).reverse().toString();
        String sub1 = S.substring(0,(len-1)/2);
        String temp2 = new StringBuffer(sub1).reverse().toString();
        String sub2 = S.substring(((len+3)/2)-1, len);
        String temp3 = new StringBuffer(sub2).reverse().toString();

        if(S.equals(temp1) && sub1.equals(temp2) && sub2.equals(temp3)) {
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String S = br.readLine();
        int len = S.length();

        String temp1 = new StringBuilder(S).reverse().toString();
        String sub1 = S.substring(0,(len-1)/2);
        String temp2 = new StringBuffer(sub1).reverse().toString();
        String sub2 = S.substring(((len+3)/2)-1, len);
        String temp3 = new StringBuffer(sub2).reverse().toString();

        if(S.equals(temp1) && sub1.equals(temp2) && sub2.equals(temp3)) {
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String S = br.readLine(); S br.readLine() br.readLine br int len = S.length(); len S.length() S.length S String temp1 = new StringBuilder(S).reverse().toString(); temp1 new StringBuilder(S).reverse().toString() new StringBuilder(S).reverse().toString new StringBuilder(S).reverse() new StringBuilder(S).reverse new StringBuilder(S) String sub1 = S.substring(0,(len-1)/2); sub1 S.substring(0,(len-1)/2) S.substring S 0 (len-1)/2 (len-1) len 1 2 String temp2 = new StringBuffer(sub1).reverse().toString(); temp2 new StringBuffer(sub1).reverse().toString() new StringBuffer(sub1).reverse().toString new StringBuffer(sub1).reverse() new StringBuffer(sub1).reverse new StringBuffer(sub1) String sub2 = S.substring(((len+3)/2)-1, len); sub2 S.substring(((len+3)/2)-1, len) S.substring S ((len+3)/2)-1 ((len+3)/2) (len+3) len 3 2 1 len String temp3 = new StringBuffer(sub2).reverse().toString(); temp3 new StringBuffer(sub2).reverse().toString() new StringBuffer(sub2).reverse().toString new StringBuffer(sub2).reverse() new StringBuffer(sub2).reverse new StringBuffer(sub2) if(S.equals(temp1) && sub1.equals(temp2) && sub2.equals(temp3)) {
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } S.equals(temp1) && sub1.equals(temp2) && sub2.equals(temp3) S.equals(temp1) && sub1.equals(temp2) && sub2.equals(temp3) S.equals(temp1) S.equals S temp1 sub1.equals(temp2) sub1.equals sub1 temp2 sub2.equals(temp3) sub2.equals sub2 temp3 {
            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 void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String S = br.readLine();
        int len = S.length();

        String temp1 = new StringBuilder(S).reverse().toString();
        String sub1 = S.substring(0,(len-1)/2);
        String temp2 = new StringBuffer(sub1).reverse().toString();
        String sub2 = S.substring(((len+3)/2)-1, len);
        String temp3 = new StringBuffer(sub2).reverse().toString();

        if(S.equals(temp1) && sub1.equals(temp2) && sub2.equals(temp3)) {
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String S = br.readLine();
        int len = S.length();

        String temp1 = new StringBuilder(S).reverse().toString();
        String sub1 = S.substring(0,(len-1)/2);
        String temp2 = new StringBuffer(sub1).reverse().toString();
        String sub2 = S.substring(((len+3)/2)-1, len);
        String temp3 = new StringBuffer(sub2).reverse().toString();

        if(S.equals(temp1) && sub1.equals(temp2) && sub2.equals(temp3)) {
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} Main
import java.io.*;
public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String S = br.readLine();
        int len = S.length();

        String temp1 = new StringBuilder(S).reverse().toString();
        String sub1 = S.substring(0,(len-1)/2);
        String temp2 = new StringBuffer(sub1).reverse().toString();
        String sub2 = S.substring(((len+3)/2)-1, len);
        String temp3 = new StringBuffer(sub2).reverse().toString();

        if(S.equals(temp1) && sub1.equals(temp2) && sub2.equals(temp3)) {
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
}