import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    boolean j1 = false;
    boolean j2 = false;
    boolean j3 = false;
    boolean j4 = false;
    
    int len = s.length();
    if(len%2 == 1){
      j1 = true;
    }

    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt(i) == s.charAt(len-1-i)){
        j2 = true;
      }else{
        j2 = false;
        break;
      }
    }
    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt(i) == s.charAt(((len-1)/2)-1-i)){
        j3 = true;
      }else{
        j3 = false;
        break;
      }
    }
    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt((len+3)/2-1+i) == s.charAt(len-1-i)){
        j4 = true;
      }else{
        j4 = false;
        break;
      }
    }

    if(j1&&j2&&j3&&j4){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }

  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    boolean j1 = false;
    boolean j2 = false;
    boolean j3 = false;
    boolean j4 = false;
    
    int len = s.length();
    if(len%2 == 1){
      j1 = true;
    }

    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt(i) == s.charAt(len-1-i)){
        j2 = true;
      }else{
        j2 = false;
        break;
      }
    }
    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt(i) == s.charAt(((len-1)/2)-1-i)){
        j3 = true;
      }else{
        j3 = false;
        break;
      }
    }
    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt((len+3)/2-1+i) == s.charAt(len-1-i)){
        j4 = true;
      }else{
        j4 = false;
        break;
      }
    }

    if(j1&&j2&&j3&&j4){
      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();
    boolean j1 = false;
    boolean j2 = false;
    boolean j3 = false;
    boolean j4 = false;
    
    int len = s.length();
    if(len%2 == 1){
      j1 = true;
    }

    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt(i) == s.charAt(len-1-i)){
        j2 = true;
      }else{
        j2 = false;
        break;
      }
    }
    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt(i) == s.charAt(((len-1)/2)-1-i)){
        j3 = true;
      }else{
        j3 = false;
        break;
      }
    }
    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt((len+3)/2-1+i) == s.charAt(len-1-i)){
        j4 = true;
      }else{
        j4 = false;
        break;
      }
    }

    if(j1&&j2&&j3&&j4){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }

  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    boolean j1 = false;
    boolean j2 = false;
    boolean j3 = false;
    boolean j4 = false;
    
    int len = s.length();
    if(len%2 == 1){
      j1 = true;
    }

    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt(i) == s.charAt(len-1-i)){
        j2 = true;
      }else{
        j2 = false;
        break;
      }
    }
    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt(i) == s.charAt(((len-1)/2)-1-i)){
        j3 = true;
      }else{
        j3 = false;
        break;
      }
    }
    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt((len+3)/2-1+i) == s.charAt(len-1-i)){
        j4 = true;
      }else{
        j4 = false;
        break;
      }
    }

    if(j1&&j2&&j3&&j4){
      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 boolean j1 = false; j1 false boolean j2 = false; j2 false boolean j3 = false; j3 false boolean j4 = false; j4 false int len = s.length(); len s.length() s.length s if(len%2 == 1){
      j1 = true;
    } len%2 == 1 len%2 len 2 1 {
      j1 = true;
    } j1 = true j1 true for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt(i) == s.charAt(len-1-i)){
        j2 = true;
      }else{
        j2 = false;
        break;
      }
    } int i = 0 ; int i = 0 ; i 0 i < len/2 i len/2 len 2 ++i ++i i {
      if(s.charAt(i) == s.charAt(len-1-i)){
        j2 = true;
      }else{
        j2 = false;
        break;
      }
    } {
      if(s.charAt(i) == s.charAt(len-1-i)){
        j2 = true;
      }else{
        j2 = false;
        break;
      }
    } if(s.charAt(i) == s.charAt(len-1-i)){
        j2 = true;
      }else{
        j2 = false;
        break;
      } s.charAt(i) == s.charAt(len-1-i) s.charAt(i) s.charAt s i s.charAt(len-1-i) s.charAt s len-1-i len-1-i len 1 i {
        j2 = true;
      } j2 = true j2 true {
        j2 = false;
        break;
      } j2 = false j2 false break; for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt(i) == s.charAt(((len-1)/2)-1-i)){
        j3 = true;
      }else{
        j3 = false;
        break;
      }
    } int i = 0 ; int i = 0 ; i 0 i < len/2 i len/2 len 2 ++i ++i i {
      if(s.charAt(i) == s.charAt(((len-1)/2)-1-i)){
        j3 = true;
      }else{
        j3 = false;
        break;
      }
    } {
      if(s.charAt(i) == s.charAt(((len-1)/2)-1-i)){
        j3 = true;
      }else{
        j3 = false;
        break;
      }
    } if(s.charAt(i) == s.charAt(((len-1)/2)-1-i)){
        j3 = true;
      }else{
        j3 = false;
        break;
      } s.charAt(i) == s.charAt(((len-1)/2)-1-i) s.charAt(i) s.charAt s i s.charAt(((len-1)/2)-1-i) s.charAt s ((len-1)/2)-1-i ((len-1)/2)-1-i ((len-1)/2) (len-1) len 1 2 1 i {
        j3 = true;
      } j3 = true j3 true {
        j3 = false;
        break;
      } j3 = false j3 false break; for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt((len+3)/2-1+i) == s.charAt(len-1-i)){
        j4 = true;
      }else{
        j4 = false;
        break;
      }
    } int i = 0 ; int i = 0 ; i 0 i < len/2 i len/2 len 2 ++i ++i i {
      if(s.charAt((len+3)/2-1+i) == s.charAt(len-1-i)){
        j4 = true;
      }else{
        j4 = false;
        break;
      }
    } {
      if(s.charAt((len+3)/2-1+i) == s.charAt(len-1-i)){
        j4 = true;
      }else{
        j4 = false;
        break;
      }
    } if(s.charAt((len+3)/2-1+i) == s.charAt(len-1-i)){
        j4 = true;
      }else{
        j4 = false;
        break;
      } s.charAt((len+3)/2-1+i) == s.charAt(len-1-i) s.charAt((len+3)/2-1+i) s.charAt s (len+3)/2-1+i (len+3)/2-1 (len+3)/2 (len+3) len 3 2 1 i s.charAt(len-1-i) s.charAt s len-1-i len-1-i len 1 i {
        j4 = true;
      } j4 = true j4 true {
        j4 = false;
        break;
      } j4 = false j4 false break; if(j1&&j2&&j3&&j4){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    } j1&&j2&&j3&&j4 j3 j1&&j2&&j3&&j4 j1 j2 j3 j4 {
      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 {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    boolean j1 = false;
    boolean j2 = false;
    boolean j3 = false;
    boolean j4 = false;
    
    int len = s.length();
    if(len%2 == 1){
      j1 = true;
    }

    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt(i) == s.charAt(len-1-i)){
        j2 = true;
      }else{
        j2 = false;
        break;
      }
    }
    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt(i) == s.charAt(((len-1)/2)-1-i)){
        j3 = true;
      }else{
        j3 = false;
        break;
      }
    }
    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt((len+3)/2-1+i) == s.charAt(len-1-i)){
        j4 = true;
      }else{
        j4 = false;
        break;
      }
    }

    if(j1&&j2&&j3&&j4){
      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();
    boolean j1 = false;
    boolean j2 = false;
    boolean j3 = false;
    boolean j4 = false;
    
    int len = s.length();
    if(len%2 == 1){
      j1 = true;
    }

    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt(i) == s.charAt(len-1-i)){
        j2 = true;
      }else{
        j2 = false;
        break;
      }
    }
    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt(i) == s.charAt(((len-1)/2)-1-i)){
        j3 = true;
      }else{
        j3 = false;
        break;
      }
    }
    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt((len+3)/2-1+i) == s.charAt(len-1-i)){
        j4 = true;
      }else{
        j4 = false;
        break;
      }
    }

    if(j1&&j2&&j3&&j4){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }

  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    boolean j1 = false;
    boolean j2 = false;
    boolean j3 = false;
    boolean j4 = false;
    
    int len = s.length();
    if(len%2 == 1){
      j1 = true;
    }

    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt(i) == s.charAt(len-1-i)){
        j2 = true;
      }else{
        j2 = false;
        break;
      }
    }
    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt(i) == s.charAt(((len-1)/2)-1-i)){
        j3 = true;
      }else{
        j3 = false;
        break;
      }
    }
    for(int i = 0 ; i < len/2 ; ++i){
      if(s.charAt((len+3)/2-1+i) == s.charAt(len-1-i)){
        j4 = true;
      }else{
        j4 = false;
        break;
      }
    }

    if(j1&&j2&&j3&&j4){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }

  }
}