    import java.io.*;
    public class Main{ public static void main(String...args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String subString = br.readLine(); int len = subString.length();
        String r1 = new StringBuilder(subString).reverse().toString(); String s1 = subString.substring(0,(len-1)/2);
        String r2 = new StringBuffer(s1).reverse().toString(); String s2 = subString.substring(((len+3)/2)-1, len);
        String r3 = new StringBuffer(s2).reverse().toString();
        if(subString.equals(r1) && s1.equals(r2) && s2.equals(r3)) 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 subString = br.readLine(); int len = subString.length();
        String r1 = new StringBuilder(subString).reverse().toString(); String s1 = subString.substring(0,(len-1)/2);
        String r2 = new StringBuffer(s1).reverse().toString(); String s2 = subString.substring(((len+3)/2)-1, len);
        String r3 = new StringBuffer(s2).reverse().toString();
        if(subString.equals(r1) && s1.equals(r2) && s2.equals(r3)) 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 subString = br.readLine(); int len = subString.length();
        String r1 = new StringBuilder(subString).reverse().toString(); String s1 = subString.substring(0,(len-1)/2);
        String r2 = new StringBuffer(s1).reverse().toString(); String s2 = subString.substring(((len+3)/2)-1, len);
        String r3 = new StringBuffer(s2).reverse().toString();
        if(subString.equals(r1) && s1.equals(r2) && s2.equals(r3)) System.out.println("Yes");
      	else System.out.println("No");} main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String subString = br.readLine(); int len = subString.length();
        String r1 = new StringBuilder(subString).reverse().toString(); String s1 = subString.substring(0,(len-1)/2);
        String r2 = new StringBuffer(s1).reverse().toString(); String s2 = subString.substring(((len+3)/2)-1, len);
        String r3 = new StringBuffer(s2).reverse().toString();
        if(subString.equals(r1) && s1.equals(r2) && s2.equals(r3)) 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 subString = br.readLine(); subString br.readLine() br.readLine br int len = subString.length(); len subString.length() subString.length subString String r1 = new StringBuilder(subString).reverse().toString(); r1 new StringBuilder(subString).reverse().toString() new StringBuilder(subString).reverse().toString new StringBuilder(subString).reverse() new StringBuilder(subString).reverse new StringBuilder(subString) String s1 = subString.substring(0,(len-1)/2); s1 subString.substring(0,(len-1)/2) subString.substring subString 0 (len-1)/2 (len-1) len 1 2 String r2 = new StringBuffer(s1).reverse().toString(); r2 new StringBuffer(s1).reverse().toString() new StringBuffer(s1).reverse().toString new StringBuffer(s1).reverse() new StringBuffer(s1).reverse new StringBuffer(s1) String s2 = subString.substring(((len+3)/2)-1, len); s2 subString.substring(((len+3)/2)-1, len) subString.substring subString ((len+3)/2)-1 ((len+3)/2) (len+3) len 3 2 1 len String r3 = new StringBuffer(s2).reverse().toString(); r3 new StringBuffer(s2).reverse().toString() new StringBuffer(s2).reverse().toString new StringBuffer(s2).reverse() new StringBuffer(s2).reverse new StringBuffer(s2) if(subString.equals(r1) && s1.equals(r2) && s2.equals(r3)) System.out.println("Yes");
      	else System.out.println("No"); subString.equals(r1) && s1.equals(r2) && s2.equals(r3) subString.equals(r1) && s1.equals(r2) && s2.equals(r3) subString.equals(r1) subString.equals subString r1 s1.equals(r2) s1.equals s1 r2 s2.equals(r3) s2.equals s2 r3 System.out.println("Yes") System.out.println System.out System System.out "Yes" 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 subString = br.readLine(); int len = subString.length();
        String r1 = new StringBuilder(subString).reverse().toString(); String s1 = subString.substring(0,(len-1)/2);
        String r2 = new StringBuffer(s1).reverse().toString(); String s2 = subString.substring(((len+3)/2)-1, len);
        String r3 = new StringBuffer(s2).reverse().toString();
        if(subString.equals(r1) && s1.equals(r2) && s2.equals(r3)) 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 subString = br.readLine(); int len = subString.length();
        String r1 = new StringBuilder(subString).reverse().toString(); String s1 = subString.substring(0,(len-1)/2);
        String r2 = new StringBuffer(s1).reverse().toString(); String s2 = subString.substring(((len+3)/2)-1, len);
        String r3 = new StringBuffer(s2).reverse().toString();
        if(subString.equals(r1) && s1.equals(r2) && s2.equals(r3)) 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 subString = br.readLine(); int len = subString.length();
        String r1 = new StringBuilder(subString).reverse().toString(); String s1 = subString.substring(0,(len-1)/2);
        String r2 = new StringBuffer(s1).reverse().toString(); String s2 = subString.substring(((len+3)/2)-1, len);
        String r3 = new StringBuffer(s2).reverse().toString();
        if(subString.equals(r1) && s1.equals(r2) && s2.equals(r3)) System.out.println("Yes");
      	else System.out.println("No");}
    }