import java.util.*;
public class Main  
{ 
    static boolean isPalindrome(String str)
    {
      	StringBuilder sb = new StringBuilder(str);
      	String st = sb.reverse().toString();
      	return st.equals(str);
    }  
    public static void main(String[] args) 
    { 
        Scanner sc =new Scanner(System.in);
        String str = sc.next();
        int N = str.length();
      	String s = str + " ";
      	int q =(N-1)/2 , p = (N+3)/2;
        if(isPalindrome(str) && isPalindrome(str.substring(0,q)) && isPalindrome(s.substring(p-1,str.length())))
        {
          	System.out.println("Yes");
        }
      else
      {
        System.out.println("No");
      }
    } 
}  import java.util.*; util.* java public class Main  
{ 
    static boolean isPalindrome(String str)
    {
      	StringBuilder sb = new StringBuilder(str);
      	String st = sb.reverse().toString();
      	return st.equals(str);
    }  
    public static void main(String[] args) 
    { 
        Scanner sc =new Scanner(System.in);
        String str = sc.next();
        int N = str.length();
      	String s = str + " ";
      	int q =(N-1)/2 , p = (N+3)/2;
        if(isPalindrome(str) && isPalindrome(str.substring(0,q)) && isPalindrome(s.substring(p-1,str.length())))
        {
          	System.out.println("Yes");
        }
      else
      {
        System.out.println("No");
      }
    } 
} Main static boolean isPalindrome(String str)
    {
      	StringBuilder sb = new StringBuilder(str);
      	String st = sb.reverse().toString();
      	return st.equals(str);
    } isPalindrome {
      	StringBuilder sb = new StringBuilder(str);
      	String st = sb.reverse().toString();
      	return st.equals(str);
    } StringBuilder sb = new StringBuilder(str); sb new StringBuilder(str) String st = sb.reverse().toString(); st sb.reverse().toString() sb.reverse().toString sb.reverse() sb.reverse sb return st.equals(str); st.equals(str) st.equals st str String str str public static void main(String[] args) 
    { 
        Scanner sc =new Scanner(System.in);
        String str = sc.next();
        int N = str.length();
      	String s = str + " ";
      	int q =(N-1)/2 , p = (N+3)/2;
        if(isPalindrome(str) && isPalindrome(str.substring(0,q)) && isPalindrome(s.substring(p-1,str.length())))
        {
          	System.out.println("Yes");
        }
      else
      {
        System.out.println("No");
      }
    } main { 
        Scanner sc =new Scanner(System.in);
        String str = sc.next();
        int N = str.length();
      	String s = str + " ";
      	int q =(N-1)/2 , p = (N+3)/2;
        if(isPalindrome(str) && isPalindrome(str.substring(0,q)) && isPalindrome(s.substring(p-1,str.length())))
        {
          	System.out.println("Yes");
        }
      else
      {
        System.out.println("No");
      }
    } Scanner sc =new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc int N = str.length(); N str.length() str.length str String s = str + " "; s str + " " str " " int q =(N-1)/2 q (N-1)/2 (N-1) N 1 2 p = (N+3)/2; p (N+3)/2 (N+3) N 3 2 if(isPalindrome(str) && isPalindrome(str.substring(0,q)) && isPalindrome(s.substring(p-1,str.length())))
        {
          	System.out.println("Yes");
        }
      else
      {
        System.out.println("No");
      } isPalindrome(str) && isPalindrome(str.substring(0,q)) && isPalindrome(s.substring(p-1,str.length())) isPalindrome(str) && isPalindrome(str.substring(0,q)) && isPalindrome(s.substring(p-1,str.length())) isPalindrome(str) isPalindrome str isPalindrome(str.substring(0,q)) isPalindrome str.substring(0,q) str.substring str 0 q isPalindrome(s.substring(p-1,str.length())) isPalindrome s.substring(p-1,str.length()) s.substring s p-1 p 1 str.length() str.length str {
          	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  
{ 
    static boolean isPalindrome(String str)
    {
      	StringBuilder sb = new StringBuilder(str);
      	String st = sb.reverse().toString();
      	return st.equals(str);
    }  
    public static void main(String[] args) 
    { 
        Scanner sc =new Scanner(System.in);
        String str = sc.next();
        int N = str.length();
      	String s = str + " ";
      	int q =(N-1)/2 , p = (N+3)/2;
        if(isPalindrome(str) && isPalindrome(str.substring(0,q)) && isPalindrome(s.substring(p-1,str.length())))
        {
          	System.out.println("Yes");
        }
      else
      {
        System.out.println("No");
      }
    } 
} public class Main  
{ 
    static boolean isPalindrome(String str)
    {
      	StringBuilder sb = new StringBuilder(str);
      	String st = sb.reverse().toString();
      	return st.equals(str);
    }  
    public static void main(String[] args) 
    { 
        Scanner sc =new Scanner(System.in);
        String str = sc.next();
        int N = str.length();
      	String s = str + " ";
      	int q =(N-1)/2 , p = (N+3)/2;
        if(isPalindrome(str) && isPalindrome(str.substring(0,q)) && isPalindrome(s.substring(p-1,str.length())))
        {
          	System.out.println("Yes");
        }
      else
      {
        System.out.println("No");
      }
    } 
} Main
import java.util.*;
public class Main  
{ 
    static boolean isPalindrome(String str)
    {
      	StringBuilder sb = new StringBuilder(str);
      	String st = sb.reverse().toString();
      	return st.equals(str);
    }  
    public static void main(String[] args) 
    { 
        Scanner sc =new Scanner(System.in);
        String str = sc.next();
        int N = str.length();
      	String s = str + " ";
      	int q =(N-1)/2 , p = (N+3)/2;
        if(isPalindrome(str) && isPalindrome(str.substring(0,q)) && isPalindrome(s.substring(p-1,str.length())))
        {
          	System.out.println("Yes");
        }
      else
      {
        System.out.println("No");
      }
    } 
} 