import java.util.*;
public class Main{
  static boolean palin(String s)
  {char c[]=s.toCharArray();
   int n=c.length;
   if(n==1)
     return true;
   for(int i=0;i<n;i++)
   {
     if(c[i]!=c[n-1-i])
       return false;
   }
   return true;
  }
 public static void main(String args[])
   { Scanner sc=new Scanner(System.in);
     String s=sc.next();
    int n=s.length();
     boolean palindrome=palin(s);
     if(palindrome)
     { String x=s.substring(0,(n-1)/2);
       String y=s.substring(((n+3)/2)-1,n);
       if(palin(x) && palin(y))
         System.out.println("Yes");
       else
      System.out.println("No");
     }
    else
      System.out.println("No");
   }
} import java.util.*; util.* java public class Main{
  static boolean palin(String s)
  {char c[]=s.toCharArray();
   int n=c.length;
   if(n==1)
     return true;
   for(int i=0;i<n;i++)
   {
     if(c[i]!=c[n-1-i])
       return false;
   }
   return true;
  }
 public static void main(String args[])
   { Scanner sc=new Scanner(System.in);
     String s=sc.next();
    int n=s.length();
     boolean palindrome=palin(s);
     if(palindrome)
     { String x=s.substring(0,(n-1)/2);
       String y=s.substring(((n+3)/2)-1,n);
       if(palin(x) && palin(y))
         System.out.println("Yes");
       else
      System.out.println("No");
     }
    else
      System.out.println("No");
   }
} Main static boolean palin(String s)
  {char c[]=s.toCharArray();
   int n=c.length;
   if(n==1)
     return true;
   for(int i=0;i<n;i++)
   {
     if(c[i]!=c[n-1-i])
       return false;
   }
   return true;
  } palin {char c[]=s.toCharArray();
   int n=c.length;
   if(n==1)
     return true;
   for(int i=0;i<n;i++)
   {
     if(c[i]!=c[n-1-i])
       return false;
   }
   return true;
  } char c[]=s.toCharArray(); c s.toCharArray() s.toCharArray s int n=c.length; n c.length c c.length if(n==1)
     return true; n==1 n 1 return true; true for(int i=0;i<n;i++)
   {
     if(c[i]!=c[n-1-i])
       return false;
   } int i=0; int i=0; i 0 i<n i n i++ i++ i {
     if(c[i]!=c[n-1-i])
       return false;
   } {
     if(c[i]!=c[n-1-i])
       return false;
   } if(c[i]!=c[n-1-i])
       return false; c[i]!=c[n-1-i] c[i] c i c[n-1-i] c n-1-i n-1-i n 1 i return false; false return true; true String s s public static void main(String args[])
   { Scanner sc=new Scanner(System.in);
     String s=sc.next();
    int n=s.length();
     boolean palindrome=palin(s);
     if(palindrome)
     { String x=s.substring(0,(n-1)/2);
       String y=s.substring(((n+3)/2)-1,n);
       if(palin(x) && palin(y))
         System.out.println("Yes");
       else
      System.out.println("No");
     }
    else
      System.out.println("No");
   } main { Scanner sc=new Scanner(System.in);
     String s=sc.next();
    int n=s.length();
     boolean palindrome=palin(s);
     if(palindrome)
     { String x=s.substring(0,(n-1)/2);
       String y=s.substring(((n+3)/2)-1,n);
       if(palin(x) && palin(y))
         System.out.println("Yes");
       else
      System.out.println("No");
     }
    else
      System.out.println("No");
   } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String s=sc.next(); s sc.next() sc.next sc int n=s.length(); n s.length() s.length s boolean palindrome=palin(s); palindrome palin(s) palin s if(palindrome)
     { String x=s.substring(0,(n-1)/2);
       String y=s.substring(((n+3)/2)-1,n);
       if(palin(x) && palin(y))
         System.out.println("Yes");
       else
      System.out.println("No");
     }
    else
      System.out.println("No"); palindrome { String x=s.substring(0,(n-1)/2);
       String y=s.substring(((n+3)/2)-1,n);
       if(palin(x) && palin(y))
         System.out.println("Yes");
       else
      System.out.println("No");
     } String x=s.substring(0,(n-1)/2); x s.substring(0,(n-1)/2) s.substring s 0 (n-1)/2 (n-1) n 1 2 String y=s.substring(((n+3)/2)-1,n); y s.substring(((n+3)/2)-1,n) s.substring s ((n+3)/2)-1 ((n+3)/2) (n+3) n 3 2 1 n if(palin(x) && palin(y))
         System.out.println("Yes");
       else
      System.out.println("No"); palin(x) && palin(y) palin(x) palin x palin(y) palin y 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" System.out.println("No") System.out.println System.out System System.out "No" String args[] args public class Main{
  static boolean palin(String s)
  {char c[]=s.toCharArray();
   int n=c.length;
   if(n==1)
     return true;
   for(int i=0;i<n;i++)
   {
     if(c[i]!=c[n-1-i])
       return false;
   }
   return true;
  }
 public static void main(String args[])
   { Scanner sc=new Scanner(System.in);
     String s=sc.next();
    int n=s.length();
     boolean palindrome=palin(s);
     if(palindrome)
     { String x=s.substring(0,(n-1)/2);
       String y=s.substring(((n+3)/2)-1,n);
       if(palin(x) && palin(y))
         System.out.println("Yes");
       else
      System.out.println("No");
     }
    else
      System.out.println("No");
   }
} public class Main{
  static boolean palin(String s)
  {char c[]=s.toCharArray();
   int n=c.length;
   if(n==1)
     return true;
   for(int i=0;i<n;i++)
   {
     if(c[i]!=c[n-1-i])
       return false;
   }
   return true;
  }
 public static void main(String args[])
   { Scanner sc=new Scanner(System.in);
     String s=sc.next();
    int n=s.length();
     boolean palindrome=palin(s);
     if(palindrome)
     { String x=s.substring(0,(n-1)/2);
       String y=s.substring(((n+3)/2)-1,n);
       if(palin(x) && palin(y))
         System.out.println("Yes");
       else
      System.out.println("No");
     }
    else
      System.out.println("No");
   }
} Main
import java.util.*;
public class Main{
  static boolean palin(String s)
  {char c[]=s.toCharArray();
   int n=c.length;
   if(n==1)
     return true;
   for(int i=0;i<n;i++)
   {
     if(c[i]!=c[n-1-i])
       return false;
   }
   return true;
  }
 public static void main(String args[])
   { Scanner sc=new Scanner(System.in);
     String s=sc.next();
    int n=s.length();
     boolean palindrome=palin(s);
     if(palindrome)
     { String x=s.substring(0,(n-1)/2);
       String y=s.substring(((n+3)/2)-1,n);
       if(palin(x) && palin(y))
         System.out.println("Yes");
       else
      System.out.println("No");
     }
    else
      System.out.println("No");
   }
}
