import java.util.*;
import java.lang.Math;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
   	String s = sc.next();
    int count = s.length() - 1;
    int count1 = (s.length()-1)/2 -1;
    int count2 = (s.length()+3)/2 -1;
    boolean ro = true;
	
    for(int i = 0; i < s.length() && ro;i++){
      if(s.charAt(i) != s.charAt(count - i)) ro = false;
      if(i <= count1){
        if(s.charAt(i) != s.charAt(count1 - i)) ro = false;
      }
      if(i >= count2){
        if(s.charAt(i) != s.charAt(count + count2 - i)) ro = false;
      }
    }
    
    if(ro) System.out.println("Yes");
    else System.out.println("No");

  }
} import java.util.*; util.* java import java.lang.Math; Math java.lang public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
   	String s = sc.next();
    int count = s.length() - 1;
    int count1 = (s.length()-1)/2 -1;
    int count2 = (s.length()+3)/2 -1;
    boolean ro = true;
	
    for(int i = 0; i < s.length() && ro;i++){
      if(s.charAt(i) != s.charAt(count - i)) ro = false;
      if(i <= count1){
        if(s.charAt(i) != s.charAt(count1 - i)) ro = false;
      }
      if(i >= count2){
        if(s.charAt(i) != s.charAt(count + count2 - i)) ro = false;
      }
    }
    
    if(ro) System.out.println("Yes");
    else System.out.println("No");

  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
   	String s = sc.next();
    int count = s.length() - 1;
    int count1 = (s.length()-1)/2 -1;
    int count2 = (s.length()+3)/2 -1;
    boolean ro = true;
	
    for(int i = 0; i < s.length() && ro;i++){
      if(s.charAt(i) != s.charAt(count - i)) ro = false;
      if(i <= count1){
        if(s.charAt(i) != s.charAt(count1 - i)) ro = false;
      }
      if(i >= count2){
        if(s.charAt(i) != s.charAt(count + count2 - i)) ro = false;
      }
    }
    
    if(ro) System.out.println("Yes");
    else System.out.println("No");

  } main {
    Scanner sc = new Scanner(System.in);
    
   	String s = sc.next();
    int count = s.length() - 1;
    int count1 = (s.length()-1)/2 -1;
    int count2 = (s.length()+3)/2 -1;
    boolean ro = true;
	
    for(int i = 0; i < s.length() && ro;i++){
      if(s.charAt(i) != s.charAt(count - i)) ro = false;
      if(i <= count1){
        if(s.charAt(i) != s.charAt(count1 - i)) ro = false;
      }
      if(i >= count2){
        if(s.charAt(i) != s.charAt(count + count2 - i)) ro = false;
      }
    }
    
    if(ro) System.out.println("Yes");
    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 count = s.length() - 1; count s.length() - 1 s.length() s.length s 1 int count1 = (s.length()-1)/2 -1; count1 (s.length()-1)/2 -1 (s.length()-1)/2 (s.length()-1) s.length() s.length s 1 2 1 int count2 = (s.length()+3)/2 -1; count2 (s.length()+3)/2 -1 (s.length()+3)/2 (s.length()+3) s.length() s.length s 3 2 1 boolean ro = true; ro true for(int i = 0; i < s.length() && ro;i++){
      if(s.charAt(i) != s.charAt(count - i)) ro = false;
      if(i <= count1){
        if(s.charAt(i) != s.charAt(count1 - i)) ro = false;
      }
      if(i >= count2){
        if(s.charAt(i) != s.charAt(count + count2 - i)) ro = false;
      }
    } int i = 0; int i = 0; i 0 i < s.length() && ro i < s.length() i s.length() s.length s ro i++ i++ i {
      if(s.charAt(i) != s.charAt(count - i)) ro = false;
      if(i <= count1){
        if(s.charAt(i) != s.charAt(count1 - i)) ro = false;
      }
      if(i >= count2){
        if(s.charAt(i) != s.charAt(count + count2 - i)) ro = false;
      }
    } {
      if(s.charAt(i) != s.charAt(count - i)) ro = false;
      if(i <= count1){
        if(s.charAt(i) != s.charAt(count1 - i)) ro = false;
      }
      if(i >= count2){
        if(s.charAt(i) != s.charAt(count + count2 - i)) ro = false;
      }
    } if(s.charAt(i) != s.charAt(count - i)) ro = false; s.charAt(i) != s.charAt(count - i) s.charAt(i) s.charAt s i s.charAt(count - i) s.charAt s count - i count i ro = false ro false if(i <= count1){
        if(s.charAt(i) != s.charAt(count1 - i)) ro = false;
      } i <= count1 i count1 {
        if(s.charAt(i) != s.charAt(count1 - i)) ro = false;
      } if(s.charAt(i) != s.charAt(count1 - i)) ro = false; s.charAt(i) != s.charAt(count1 - i) s.charAt(i) s.charAt s i s.charAt(count1 - i) s.charAt s count1 - i count1 i ro = false ro false if(i >= count2){
        if(s.charAt(i) != s.charAt(count + count2 - i)) ro = false;
      } i >= count2 i count2 {
        if(s.charAt(i) != s.charAt(count + count2 - i)) ro = false;
      } if(s.charAt(i) != s.charAt(count + count2 - i)) ro = false; s.charAt(i) != s.charAt(count + count2 - i) s.charAt(i) s.charAt s i s.charAt(count + count2 - i) s.charAt s count + count2 - i count + count2 count count2 i ro = false ro false if(ro) System.out.println("Yes");
    else System.out.println("No"); ro 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) {
    Scanner sc = new Scanner(System.in);
    
   	String s = sc.next();
    int count = s.length() - 1;
    int count1 = (s.length()-1)/2 -1;
    int count2 = (s.length()+3)/2 -1;
    boolean ro = true;
	
    for(int i = 0; i < s.length() && ro;i++){
      if(s.charAt(i) != s.charAt(count - i)) ro = false;
      if(i <= count1){
        if(s.charAt(i) != s.charAt(count1 - i)) ro = false;
      }
      if(i >= count2){
        if(s.charAt(i) != s.charAt(count + count2 - i)) ro = false;
      }
    }
    
    if(ro) System.out.println("Yes");
    else System.out.println("No");

  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
   	String s = sc.next();
    int count = s.length() - 1;
    int count1 = (s.length()-1)/2 -1;
    int count2 = (s.length()+3)/2 -1;
    boolean ro = true;
	
    for(int i = 0; i < s.length() && ro;i++){
      if(s.charAt(i) != s.charAt(count - i)) ro = false;
      if(i <= count1){
        if(s.charAt(i) != s.charAt(count1 - i)) ro = false;
      }
      if(i >= count2){
        if(s.charAt(i) != s.charAt(count + count2 - i)) ro = false;
      }
    }
    
    if(ro) System.out.println("Yes");
    else System.out.println("No");

  }
} Main
import java.util.*;
import java.lang.Math;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
   	String s = sc.next();
    int count = s.length() - 1;
    int count1 = (s.length()-1)/2 -1;
    int count2 = (s.length()+3)/2 -1;
    boolean ro = true;
	
    for(int i = 0; i < s.length() && ro;i++){
      if(s.charAt(i) != s.charAt(count - i)) ro = false;
      if(i <= count1){
        if(s.charAt(i) != s.charAt(count1 - i)) ro = false;
      }
      if(i >= count2){
        if(s.charAt(i) != s.charAt(count + count2 - i)) ro = false;
      }
    }
    
    if(ro) System.out.println("Yes");
    else System.out.println("No");

  }
}
