import java.util.*;
class Main
{
	public static void main(String[] args) 
    { 	Scanner s=new Scanner(System.in);
         String str = s.nextLine(); 
         StringBuilder input1 = new StringBuilder(); 
          StringBuilder input2 = new StringBuilder(); 
          StringBuilder s3 = new StringBuilder(); 
           StringBuilder s4 = new StringBuilder(); 
          String s1="",s2="";
          int c1,c2;
          int l=str.length();
          s1=str.substring(0,(l-1)/2);
          
         	
        
  
        if (isPalindrome(s1))  
        	c1=1;
            //System.out.print("Yes"); 
        else
        	c1=0;
        
       
          s2=str.substring((l-1)/2 +1,l);
          
        
  
        if (isPalindrome(s2))  
        	c2=1;
            //System.out.print("Yes"); 
        else
        	c2=0;
            //System.out.print("No"); 
 

        if ((isPalindrome(str))  && c1==1 && c2==1 ) 
        	
            System.out.print("Yes"); 
        else
        	System.out.print("No"); 

        	
    } 
    static boolean isPalindrome(String str) 
    { 
  
        // Pointers pointing to the beginning 
        // and the end of the string 
        int i = 0, j = str.length() - 1; 
  
        // While there are characters toc compare 
        while (i < j) { 
  
            // If there is a mismatch 
            if (str.charAt(i) != str.charAt(j)) 
                return false; 
  
            // Increment first pointer and 
            // decrement the other 
            i++; 
            j--; 
        } 
  
        // Given string is a palindrome 
        return true; 
    } 
} import java.util.*; util.* java class Main
{
	public static void main(String[] args) 
    { 	Scanner s=new Scanner(System.in);
         String str = s.nextLine(); 
         StringBuilder input1 = new StringBuilder(); 
          StringBuilder input2 = new StringBuilder(); 
          StringBuilder s3 = new StringBuilder(); 
           StringBuilder s4 = new StringBuilder(); 
          String s1="",s2="";
          int c1,c2;
          int l=str.length();
          s1=str.substring(0,(l-1)/2);
          
         	
        
  
        if (isPalindrome(s1))  
        	c1=1;
            //System.out.print("Yes"); 
        else
        	c1=0;
        
       
          s2=str.substring((l-1)/2 +1,l);
          
        
  
        if (isPalindrome(s2))  
        	c2=1;
            //System.out.print("Yes"); 
        else
        	c2=0;
            //System.out.print("No"); 
 

        if ((isPalindrome(str))  && c1==1 && c2==1 ) 
        	
            System.out.print("Yes"); 
        else
        	System.out.print("No"); 

        	
    } 
    static boolean isPalindrome(String str) 
    { 
  
        // Pointers pointing to the beginning 
        // and the end of the string 
        int i = 0, j = str.length() - 1; 
  
        // While there are characters toc compare 
        while (i < j) { 
  
            // If there is a mismatch 
            if (str.charAt(i) != str.charAt(j)) 
                return false; 
  
            // Increment first pointer and 
            // decrement the other 
            i++; 
            j--; 
        } 
  
        // Given string is a palindrome 
        return true; 
    } 
} Main public static void main(String[] args) 
    { 	Scanner s=new Scanner(System.in);
         String str = s.nextLine(); 
         StringBuilder input1 = new StringBuilder(); 
          StringBuilder input2 = new StringBuilder(); 
          StringBuilder s3 = new StringBuilder(); 
           StringBuilder s4 = new StringBuilder(); 
          String s1="",s2="";
          int c1,c2;
          int l=str.length();
          s1=str.substring(0,(l-1)/2);
          
         	
        
  
        if (isPalindrome(s1))  
        	c1=1;
            //System.out.print("Yes"); 
        else
        	c1=0;
        
       
          s2=str.substring((l-1)/2 +1,l);
          
        
  
        if (isPalindrome(s2))  
        	c2=1;
            //System.out.print("Yes"); 
        else
        	c2=0;
            //System.out.print("No"); 
 

        if ((isPalindrome(str))  && c1==1 && c2==1 ) 
        	
            System.out.print("Yes"); 
        else
        	System.out.print("No"); 

        	
    } main { 	Scanner s=new Scanner(System.in);
         String str = s.nextLine(); 
         StringBuilder input1 = new StringBuilder(); 
          StringBuilder input2 = new StringBuilder(); 
          StringBuilder s3 = new StringBuilder(); 
           StringBuilder s4 = new StringBuilder(); 
          String s1="",s2="";
          int c1,c2;
          int l=str.length();
          s1=str.substring(0,(l-1)/2);
          
         	
        
  
        if (isPalindrome(s1))  
        	c1=1;
            //System.out.print("Yes"); 
        else
        	c1=0;
        
       
          s2=str.substring((l-1)/2 +1,l);
          
        
  
        if (isPalindrome(s2))  
        	c2=1;
            //System.out.print("Yes"); 
        else
        	c2=0;
            //System.out.print("No"); 
 

        if ((isPalindrome(str))  && c1==1 && c2==1 ) 
        	
            System.out.print("Yes"); 
        else
        	System.out.print("No"); 

        	
    } Scanner s=new Scanner(System.in); s new Scanner(System.in) String str = s.nextLine(); str s.nextLine() s.nextLine s StringBuilder input1 = new StringBuilder(); input1 new StringBuilder() StringBuilder input2 = new StringBuilder(); input2 new StringBuilder() StringBuilder s3 = new StringBuilder(); s3 new StringBuilder() StringBuilder s4 = new StringBuilder(); s4 new StringBuilder() String s1="" s1 "" s2=""; s2 "" int c1 c1 c2; c2 int l=str.length(); l str.length() str.length str s1=str.substring(0,(l-1)/2) s1 str.substring(0,(l-1)/2) str.substring str 0 (l-1)/2 (l-1) l 1 2 if (isPalindrome(s1))  
        	c1=1;
            //System.out.print("Yes"); 
        else
        	c1=0; isPalindrome(s1) isPalindrome s1 c1=1 c1 1 c1=0 c1 0 s2=str.substring((l-1)/2 +1,l) s2 str.substring((l-1)/2 +1,l) str.substring str (l-1)/2 +1 (l-1)/2 (l-1) l 1 2 1 l if (isPalindrome(s2))  
        	c2=1;
            //System.out.print("Yes"); 
        else
        	c2=0; isPalindrome(s2) isPalindrome s2 c2=1 c2 1 c2=0 c2 0 if ((isPalindrome(str))  && c1==1 && c2==1 ) 
        	
            System.out.print("Yes"); 
        else
        	System.out.print("No"); (isPalindrome(str))  && c1==1 && c2==1 (isPalindrome(str))  && c1==1 && c2==1 (isPalindrome(str)) isPalindrome str c1==1 c1 1 c2==1 c2 1 System.out.print("Yes") System.out.print System.out System System.out "Yes" System.out.print("No") System.out.print System.out System System.out "No" String[] args args static boolean isPalindrome(String str) 
    { 
  
        // Pointers pointing to the beginning 
        // and the end of the string 
        int i = 0, j = str.length() - 1; 
  
        // While there are characters toc compare 
        while (i < j) { 
  
            // If there is a mismatch 
            if (str.charAt(i) != str.charAt(j)) 
                return false; 
  
            // Increment first pointer and 
            // decrement the other 
            i++; 
            j--; 
        } 
  
        // Given string is a palindrome 
        return true; 
    } isPalindrome { 
  
        // Pointers pointing to the beginning 
        // and the end of the string 
        int i = 0, j = str.length() - 1; 
  
        // While there are characters toc compare 
        while (i < j) { 
  
            // If there is a mismatch 
            if (str.charAt(i) != str.charAt(j)) 
                return false; 
  
            // Increment first pointer and 
            // decrement the other 
            i++; 
            j--; 
        } 
  
        // Given string is a palindrome 
        return true; 
    } int i = 0 i 0 j = str.length() - 1; j str.length() - 1 str.length() str.length str 1 while (i < j) { 
  
            // If there is a mismatch 
            if (str.charAt(i) != str.charAt(j)) 
                return false; 
  
            // Increment first pointer and 
            // decrement the other 
            i++; 
            j--; 
        } i < j i j { 
  
            // If there is a mismatch 
            if (str.charAt(i) != str.charAt(j)) 
                return false; 
  
            // Increment first pointer and 
            // decrement the other 
            i++; 
            j--; 
        } if (str.charAt(i) != str.charAt(j)) 
                return false; str.charAt(i) != str.charAt(j) str.charAt(i) str.charAt str i str.charAt(j) str.charAt str j return false; false i++ i j-- j return true; true String str str
import java.util.*;
class Main
{
	public static void main(String[] args) 
    { 	Scanner s=new Scanner(System.in);
         String str = s.nextLine(); 
         StringBuilder input1 = new StringBuilder(); 
          StringBuilder input2 = new StringBuilder(); 
          StringBuilder s3 = new StringBuilder(); 
           StringBuilder s4 = new StringBuilder(); 
          String s1="",s2="";
          int c1,c2;
          int l=str.length();
          s1=str.substring(0,(l-1)/2);
          
         	
        
  
        if (isPalindrome(s1))  
        	c1=1;
            //System.out.print("Yes"); 
        else
        	c1=0;
        
       
          s2=str.substring((l-1)/2 +1,l);
          
        
  
        if (isPalindrome(s2))  
        	c2=1;
            //System.out.print("Yes"); 
        else
        	c2=0;
            //System.out.print("No"); 
 

        if ((isPalindrome(str))  && c1==1 && c2==1 ) 
        	
            System.out.print("Yes"); 
        else
        	System.out.print("No"); 

        	
    } 
    static boolean isPalindrome(String str) 
    { 
  
        // Pointers pointing to the beginning 
        // and the end of the string 
        int i = 0, j = str.length() - 1; 
  
        // While there are characters toc compare 
        while (i < j) { 
  
            // If there is a mismatch 
            if (str.charAt(i) != str.charAt(j)) 
                return false; 
  
            // Increment first pointer and 
            // decrement the other 
            i++; 
            j--; 
        } 
  
        // Given string is a palindrome 
        return true; 
    } 
}
