import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    sc.close();
    System.out.println(isStrongPalindrome(s) ? "Yes" : "No");
  }
  static boolean isStrongPalindrome(String s){
    int left1 = 0;
    int right1 = s.length() - 1;
    int left2 = 0;
    int right2 = ((s.length() - 1 ) / 2) - 1;
    while(left1 <= right1){
      if(s.charAt(left1) != s.charAt(right1)){
        return false;
      }
      left1++;
      right1--;
    }
    while(left2 <= right1){
      if(s.charAt(left2) != s.charAt(right2)){
        return false;
      }
      left2++;
      right2--;
    }
    return true;
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    sc.close();
    System.out.println(isStrongPalindrome(s) ? "Yes" : "No");
  }
  static boolean isStrongPalindrome(String s){
    int left1 = 0;
    int right1 = s.length() - 1;
    int left2 = 0;
    int right2 = ((s.length() - 1 ) / 2) - 1;
    while(left1 <= right1){
      if(s.charAt(left1) != s.charAt(right1)){
        return false;
      }
      left1++;
      right1--;
    }
    while(left2 <= right1){
      if(s.charAt(left2) != s.charAt(right2)){
        return false;
      }
      left2++;
      right2--;
    }
    return true;
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    sc.close();
    System.out.println(isStrongPalindrome(s) ? "Yes" : "No");
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    sc.close();
    System.out.println(isStrongPalindrome(s) ? "Yes" : "No");
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc sc.close() sc.close sc System.out.println(isStrongPalindrome(s) ? "Yes" : "No") System.out.println System.out System System.out isStrongPalindrome(s) ? "Yes" : "No" isStrongPalindrome(s) isStrongPalindrome s "Yes" "No" String[] args args static boolean isStrongPalindrome(String s){
    int left1 = 0;
    int right1 = s.length() - 1;
    int left2 = 0;
    int right2 = ((s.length() - 1 ) / 2) - 1;
    while(left1 <= right1){
      if(s.charAt(left1) != s.charAt(right1)){
        return false;
      }
      left1++;
      right1--;
    }
    while(left2 <= right1){
      if(s.charAt(left2) != s.charAt(right2)){
        return false;
      }
      left2++;
      right2--;
    }
    return true;
  } isStrongPalindrome {
    int left1 = 0;
    int right1 = s.length() - 1;
    int left2 = 0;
    int right2 = ((s.length() - 1 ) / 2) - 1;
    while(left1 <= right1){
      if(s.charAt(left1) != s.charAt(right1)){
        return false;
      }
      left1++;
      right1--;
    }
    while(left2 <= right1){
      if(s.charAt(left2) != s.charAt(right2)){
        return false;
      }
      left2++;
      right2--;
    }
    return true;
  } int left1 = 0; left1 0 int right1 = s.length() - 1; right1 s.length() - 1 s.length() s.length s 1 int left2 = 0; left2 0 int right2 = ((s.length() - 1 ) / 2) - 1; right2 ((s.length() - 1 ) / 2) - 1 ((s.length() - 1 ) / 2) (s.length() - 1 ) s.length() s.length s 1 2 1 while(left1 <= right1){
      if(s.charAt(left1) != s.charAt(right1)){
        return false;
      }
      left1++;
      right1--;
    } left1 <= right1 left1 right1 {
      if(s.charAt(left1) != s.charAt(right1)){
        return false;
      }
      left1++;
      right1--;
    } if(s.charAt(left1) != s.charAt(right1)){
        return false;
      } s.charAt(left1) != s.charAt(right1) s.charAt(left1) s.charAt s left1 s.charAt(right1) s.charAt s right1 {
        return false;
      } return false; false left1++ left1 right1-- right1 while(left2 <= right1){
      if(s.charAt(left2) != s.charAt(right2)){
        return false;
      }
      left2++;
      right2--;
    } left2 <= right1 left2 right1 {
      if(s.charAt(left2) != s.charAt(right2)){
        return false;
      }
      left2++;
      right2--;
    } if(s.charAt(left2) != s.charAt(right2)){
        return false;
      } s.charAt(left2) != s.charAt(right2) s.charAt(left2) s.charAt s left2 s.charAt(right2) s.charAt s right2 {
        return false;
      } return false; false left2++ left2 right2-- right2 return true; true String s s public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    sc.close();
    System.out.println(isStrongPalindrome(s) ? "Yes" : "No");
  }
  static boolean isStrongPalindrome(String s){
    int left1 = 0;
    int right1 = s.length() - 1;
    int left2 = 0;
    int right2 = ((s.length() - 1 ) / 2) - 1;
    while(left1 <= right1){
      if(s.charAt(left1) != s.charAt(right1)){
        return false;
      }
      left1++;
      right1--;
    }
    while(left2 <= right1){
      if(s.charAt(left2) != s.charAt(right2)){
        return false;
      }
      left2++;
      right2--;
    }
    return true;
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    sc.close();
    System.out.println(isStrongPalindrome(s) ? "Yes" : "No");
  }
  static boolean isStrongPalindrome(String s){
    int left1 = 0;
    int right1 = s.length() - 1;
    int left2 = 0;
    int right2 = ((s.length() - 1 ) / 2) - 1;
    while(left1 <= right1){
      if(s.charAt(left1) != s.charAt(right1)){
        return false;
      }
      left1++;
      right1--;
    }
    while(left2 <= right1){
      if(s.charAt(left2) != s.charAt(right2)){
        return false;
      }
      left2++;
      right2--;
    }
    return true;
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    sc.close();
    System.out.println(isStrongPalindrome(s) ? "Yes" : "No");
  }
  static boolean isStrongPalindrome(String s){
    int left1 = 0;
    int right1 = s.length() - 1;
    int left2 = 0;
    int right2 = ((s.length() - 1 ) / 2) - 1;
    while(left1 <= right1){
      if(s.charAt(left1) != s.charAt(right1)){
        return false;
      }
      left1++;
      right1--;
    }
    while(left2 <= right1){
      if(s.charAt(left2) != s.charAt(right2)){
        return false;
      }
      left2++;
      right2--;
    }
    return true;
  }
}
