import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int N = S.length();
    int count =0, countF =0, countL =0;
    for (int i =0; i<N/2; i++) {
      if(S.charAt(i) == S.charAt(N-1-i)) count++;
    }
    String SF = S.substring(0,(N-1)/2);
    String SL = S.substring((N+1)/2,N);
    for (int i =0; i<SF.length()/2; i++) {
      if(SF.charAt(i) == SF.charAt(SF.length()-1-i)) countF++;
      if(SL.charAt(i) == SL.charAt(SF.length()-1-i)) countL++;
    }
    if (count == N/2 && countF == SF.length()/2 && countL == SF.length()/2) {
      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();
    int N = S.length();
    int count =0, countF =0, countL =0;
    for (int i =0; i<N/2; i++) {
      if(S.charAt(i) == S.charAt(N-1-i)) count++;
    }
    String SF = S.substring(0,(N-1)/2);
    String SL = S.substring((N+1)/2,N);
    for (int i =0; i<SF.length()/2; i++) {
      if(SF.charAt(i) == SF.charAt(SF.length()-1-i)) countF++;
      if(SL.charAt(i) == SL.charAt(SF.length()-1-i)) countL++;
    }
    if (count == N/2 && countF == SF.length()/2 && countL == SF.length()/2) {
      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 N = S.length();
    int count =0, countF =0, countL =0;
    for (int i =0; i<N/2; i++) {
      if(S.charAt(i) == S.charAt(N-1-i)) count++;
    }
    String SF = S.substring(0,(N-1)/2);
    String SL = S.substring((N+1)/2,N);
    for (int i =0; i<SF.length()/2; i++) {
      if(SF.charAt(i) == SF.charAt(SF.length()-1-i)) countF++;
      if(SL.charAt(i) == SL.charAt(SF.length()-1-i)) countL++;
    }
    if (count == N/2 && countF == SF.length()/2 && countL == SF.length()/2) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  } main {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int N = S.length();
    int count =0, countF =0, countL =0;
    for (int i =0; i<N/2; i++) {
      if(S.charAt(i) == S.charAt(N-1-i)) count++;
    }
    String SF = S.substring(0,(N-1)/2);
    String SL = S.substring((N+1)/2,N);
    for (int i =0; i<SF.length()/2; i++) {
      if(SF.charAt(i) == SF.charAt(SF.length()-1-i)) countF++;
      if(SL.charAt(i) == SL.charAt(SF.length()-1-i)) countL++;
    }
    if (count == N/2 && countF == SF.length()/2 && countL == SF.length()/2) {
      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 N = S.length(); N S.length() S.length S int count =0 count 0 countF =0 countF 0 countL =0; countL 0 for (int i =0; i<N/2; i++) {
      if(S.charAt(i) == S.charAt(N-1-i)) count++;
    } int i =0; int i =0; i 0 i<N/2 i N/2 N 2 i++ i++ i {
      if(S.charAt(i) == S.charAt(N-1-i)) count++;
    } {
      if(S.charAt(i) == S.charAt(N-1-i)) count++;
    } if(S.charAt(i) == S.charAt(N-1-i)) count++; S.charAt(i) == S.charAt(N-1-i) S.charAt(i) S.charAt S i S.charAt(N-1-i) S.charAt S N-1-i N-1-i N 1 i count++ count String SF = S.substring(0,(N-1)/2); SF S.substring(0,(N-1)/2) S.substring S 0 (N-1)/2 (N-1) N 1 2 String SL = S.substring((N+1)/2,N); SL S.substring((N+1)/2,N) S.substring S (N+1)/2 (N+1) N 1 2 N for (int i =0; i<SF.length()/2; i++) {
      if(SF.charAt(i) == SF.charAt(SF.length()-1-i)) countF++;
      if(SL.charAt(i) == SL.charAt(SF.length()-1-i)) countL++;
    } int i =0; int i =0; i 0 i<SF.length()/2 i SF.length()/2 SF.length() SF.length SF 2 i++ i++ i {
      if(SF.charAt(i) == SF.charAt(SF.length()-1-i)) countF++;
      if(SL.charAt(i) == SL.charAt(SF.length()-1-i)) countL++;
    } {
      if(SF.charAt(i) == SF.charAt(SF.length()-1-i)) countF++;
      if(SL.charAt(i) == SL.charAt(SF.length()-1-i)) countL++;
    } if(SF.charAt(i) == SF.charAt(SF.length()-1-i)) countF++; SF.charAt(i) == SF.charAt(SF.length()-1-i) SF.charAt(i) SF.charAt SF i SF.charAt(SF.length()-1-i) SF.charAt SF SF.length()-1-i SF.length()-1-i SF.length() SF.length SF 1 i countF++ countF if(SL.charAt(i) == SL.charAt(SF.length()-1-i)) countL++; SL.charAt(i) == SL.charAt(SF.length()-1-i) SL.charAt(i) SL.charAt SL i SL.charAt(SF.length()-1-i) SL.charAt SL SF.length()-1-i SF.length()-1-i SF.length() SF.length SF 1 i countL++ countL if (count == N/2 && countF == SF.length()/2 && countL == SF.length()/2) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    } count == N/2 && countF == SF.length()/2 && countL == SF.length()/2 count == N/2 && countF == SF.length()/2 && countL == SF.length()/2 count == N/2 count N/2 N 2 countF == SF.length()/2 countF SF.length()/2 SF.length() SF.length SF 2 countL == SF.length()/2 countL SF.length()/2 SF.length() SF.length SF 2 {
      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();
    int N = S.length();
    int count =0, countF =0, countL =0;
    for (int i =0; i<N/2; i++) {
      if(S.charAt(i) == S.charAt(N-1-i)) count++;
    }
    String SF = S.substring(0,(N-1)/2);
    String SL = S.substring((N+1)/2,N);
    for (int i =0; i<SF.length()/2; i++) {
      if(SF.charAt(i) == SF.charAt(SF.length()-1-i)) countF++;
      if(SL.charAt(i) == SL.charAt(SF.length()-1-i)) countL++;
    }
    if (count == N/2 && countF == SF.length()/2 && countL == SF.length()/2) {
      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 N = S.length();
    int count =0, countF =0, countL =0;
    for (int i =0; i<N/2; i++) {
      if(S.charAt(i) == S.charAt(N-1-i)) count++;
    }
    String SF = S.substring(0,(N-1)/2);
    String SL = S.substring((N+1)/2,N);
    for (int i =0; i<SF.length()/2; i++) {
      if(SF.charAt(i) == SF.charAt(SF.length()-1-i)) countF++;
      if(SL.charAt(i) == SL.charAt(SF.length()-1-i)) countL++;
    }
    if (count == N/2 && countF == SF.length()/2 && countL == SF.length()/2) {
      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();
    int N = S.length();
    int count =0, countF =0, countL =0;
    for (int i =0; i<N/2; i++) {
      if(S.charAt(i) == S.charAt(N-1-i)) count++;
    }
    String SF = S.substring(0,(N-1)/2);
    String SL = S.substring((N+1)/2,N);
    for (int i =0; i<SF.length()/2; i++) {
      if(SF.charAt(i) == SF.charAt(SF.length()-1-i)) countF++;
      if(SL.charAt(i) == SL.charAt(SF.length()-1-i)) countL++;
    }
    if (count == N/2 && countF == SF.length()/2 && countL == SF.length()/2) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
}