import java.io.*;
import java.lang.*;
import java.util.*;
public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String s=br.readLine();
        int N=s.length();
        int mid=N/2;
        boolean flag=true;
        for(int i=0;i<=mid;i++){
            if(s.charAt(i)!=s.charAt(N-1-i)){
                flag=false;
                break;
            }
        }
        int mid1=mid/2;
        for(int i=0;flag && i<=mid1;i++){
            if(s.charAt(i)!=s.charAt(mid-1-i)) flag=false;
        }
        int mid2=mid/2+mid+1;
        for(int i=mid+1;flag && i<=mid2;i++){
            if(s.charAt(i)!=s.charAt(2*mid-i)) flag=false;
        }
        if(flag) System.out.println("Yes");
        else System.out.println("No");
    }
} import java.io.*; io.* java import java.lang.*; lang.* java import java.util.*; util.* 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 N=s.length();
        int mid=N/2;
        boolean flag=true;
        for(int i=0;i<=mid;i++){
            if(s.charAt(i)!=s.charAt(N-1-i)){
                flag=false;
                break;
            }
        }
        int mid1=mid/2;
        for(int i=0;flag && i<=mid1;i++){
            if(s.charAt(i)!=s.charAt(mid-1-i)) flag=false;
        }
        int mid2=mid/2+mid+1;
        for(int i=mid+1;flag && i<=mid2;i++){
            if(s.charAt(i)!=s.charAt(2*mid-i)) flag=false;
        }
        if(flag) 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 N=s.length();
        int mid=N/2;
        boolean flag=true;
        for(int i=0;i<=mid;i++){
            if(s.charAt(i)!=s.charAt(N-1-i)){
                flag=false;
                break;
            }
        }
        int mid1=mid/2;
        for(int i=0;flag && i<=mid1;i++){
            if(s.charAt(i)!=s.charAt(mid-1-i)) flag=false;
        }
        int mid2=mid/2+mid+1;
        for(int i=mid+1;flag && i<=mid2;i++){
            if(s.charAt(i)!=s.charAt(2*mid-i)) flag=false;
        }
        if(flag) System.out.println("Yes");
        else System.out.println("No");
    } main {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String s=br.readLine();
        int N=s.length();
        int mid=N/2;
        boolean flag=true;
        for(int i=0;i<=mid;i++){
            if(s.charAt(i)!=s.charAt(N-1-i)){
                flag=false;
                break;
            }
        }
        int mid1=mid/2;
        for(int i=0;flag && i<=mid1;i++){
            if(s.charAt(i)!=s.charAt(mid-1-i)) flag=false;
        }
        int mid2=mid/2+mid+1;
        for(int i=mid+1;flag && i<=mid2;i++){
            if(s.charAt(i)!=s.charAt(2*mid-i)) flag=false;
        }
        if(flag) 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 N=s.length(); N s.length() s.length s int mid=N/2; mid N/2 N 2 boolean flag=true; flag true for(int i=0;i<=mid;i++){
            if(s.charAt(i)!=s.charAt(N-1-i)){
                flag=false;
                break;
            }
        } int i=0; int i=0; i 0 i<=mid i mid i++ i++ i {
            if(s.charAt(i)!=s.charAt(N-1-i)){
                flag=false;
                break;
            }
        } {
            if(s.charAt(i)!=s.charAt(N-1-i)){
                flag=false;
                break;
            }
        } if(s.charAt(i)!=s.charAt(N-1-i)){
                flag=false;
                break;
            } s.charAt(i)!=s.charAt(N-1-i) s.charAt(i) s.charAt s i s.charAt(N-1-i) s.charAt s N-1-i N-1-i N 1 i {
                flag=false;
                break;
            } flag=false flag false break; int mid1=mid/2; mid1 mid/2 mid 2 for(int i=0;flag && i<=mid1;i++){
            if(s.charAt(i)!=s.charAt(mid-1-i)) flag=false;
        } int i=0; int i=0; i 0 flag && i<=mid1 flag i<=mid1 i mid1 i++ i++ i {
            if(s.charAt(i)!=s.charAt(mid-1-i)) flag=false;
        } {
            if(s.charAt(i)!=s.charAt(mid-1-i)) flag=false;
        } if(s.charAt(i)!=s.charAt(mid-1-i)) flag=false; s.charAt(i)!=s.charAt(mid-1-i) s.charAt(i) s.charAt s i s.charAt(mid-1-i) s.charAt s mid-1-i mid-1-i mid 1 i flag=false flag false int mid2=mid/2+mid+1; mid2 mid/2+mid+1 mid/2+mid+1 mid/2 mid 2 mid 1 for(int i=mid+1;flag && i<=mid2;i++){
            if(s.charAt(i)!=s.charAt(2*mid-i)) flag=false;
        } int i=mid+1; int i=mid+1; i mid+1 mid 1 flag && i<=mid2 flag i<=mid2 i mid2 i++ i++ i {
            if(s.charAt(i)!=s.charAt(2*mid-i)) flag=false;
        } {
            if(s.charAt(i)!=s.charAt(2*mid-i)) flag=false;
        } if(s.charAt(i)!=s.charAt(2*mid-i)) flag=false; s.charAt(i)!=s.charAt(2*mid-i) s.charAt(i) s.charAt s i s.charAt(2*mid-i) s.charAt s 2*mid-i 2*mid 2 mid i flag=false flag false if(flag) System.out.println("Yes");
        else System.out.println("No"); flag 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 s=br.readLine();
        int N=s.length();
        int mid=N/2;
        boolean flag=true;
        for(int i=0;i<=mid;i++){
            if(s.charAt(i)!=s.charAt(N-1-i)){
                flag=false;
                break;
            }
        }
        int mid1=mid/2;
        for(int i=0;flag && i<=mid1;i++){
            if(s.charAt(i)!=s.charAt(mid-1-i)) flag=false;
        }
        int mid2=mid/2+mid+1;
        for(int i=mid+1;flag && i<=mid2;i++){
            if(s.charAt(i)!=s.charAt(2*mid-i)) flag=false;
        }
        if(flag) 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 N=s.length();
        int mid=N/2;
        boolean flag=true;
        for(int i=0;i<=mid;i++){
            if(s.charAt(i)!=s.charAt(N-1-i)){
                flag=false;
                break;
            }
        }
        int mid1=mid/2;
        for(int i=0;flag && i<=mid1;i++){
            if(s.charAt(i)!=s.charAt(mid-1-i)) flag=false;
        }
        int mid2=mid/2+mid+1;
        for(int i=mid+1;flag && i<=mid2;i++){
            if(s.charAt(i)!=s.charAt(2*mid-i)) flag=false;
        }
        if(flag) System.out.println("Yes");
        else System.out.println("No");
    }
} Main
import java.io.*;
import java.lang.*;
import java.util.*;
public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String s=br.readLine();
        int N=s.length();
        int mid=N/2;
        boolean flag=true;
        for(int i=0;i<=mid;i++){
            if(s.charAt(i)!=s.charAt(N-1-i)){
                flag=false;
                break;
            }
        }
        int mid1=mid/2;
        for(int i=0;flag && i<=mid1;i++){
            if(s.charAt(i)!=s.charAt(mid-1-i)) flag=false;
        }
        int mid2=mid/2+mid+1;
        for(int i=mid+1;flag && i<=mid2;i++){
            if(s.charAt(i)!=s.charAt(2*mid-i)) flag=false;
        }
        if(flag) System.out.println("Yes");
        else System.out.println("No");
    }
}