import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    try {
      String s = sc.next();
      int n = s.length();

      String a = s.substring(0, n/2);
      String b = s.substring(n/2+1, n);

      boolean ans = isKaibun(a) && isKaibun(b) && isKaibun(s);
      System.out.println(ans ? "Yes" : "No");
    } finally {
      sc.close();
    }
  }

  private static boolean isKaibun(String s) {
    boolean ans = true;
    for (int i = 0; i < s.length() / 2; i++) {
      if (s.charAt(i) != s.charAt(s.length() - 1 - i)) ans = false;
    }
    return ans;
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    try {
      String s = sc.next();
      int n = s.length();

      String a = s.substring(0, n/2);
      String b = s.substring(n/2+1, n);

      boolean ans = isKaibun(a) && isKaibun(b) && isKaibun(s);
      System.out.println(ans ? "Yes" : "No");
    } finally {
      sc.close();
    }
  }

  private static boolean isKaibun(String s) {
    boolean ans = true;
    for (int i = 0; i < s.length() / 2; i++) {
      if (s.charAt(i) != s.charAt(s.length() - 1 - i)) ans = false;
    }
    return ans;
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    try {
      String s = sc.next();
      int n = s.length();

      String a = s.substring(0, n/2);
      String b = s.substring(n/2+1, n);

      boolean ans = isKaibun(a) && isKaibun(b) && isKaibun(s);
      System.out.println(ans ? "Yes" : "No");
    } finally {
      sc.close();
    }
  } main {
    Scanner sc = new Scanner(System.in);
    try {
      String s = sc.next();
      int n = s.length();

      String a = s.substring(0, n/2);
      String b = s.substring(n/2+1, n);

      boolean ans = isKaibun(a) && isKaibun(b) && isKaibun(s);
      System.out.println(ans ? "Yes" : "No");
    } finally {
      sc.close();
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) try {
      String s = sc.next();
      int n = s.length();

      String a = s.substring(0, n/2);
      String b = s.substring(n/2+1, n);

      boolean ans = isKaibun(a) && isKaibun(b) && isKaibun(s);
      System.out.println(ans ? "Yes" : "No");
    } finally {
      sc.close();
    } {
      sc.close();
    } sc.close() sc.close sc {
      String s = sc.next();
      int n = s.length();

      String a = s.substring(0, n/2);
      String b = s.substring(n/2+1, n);

      boolean ans = isKaibun(a) && isKaibun(b) && isKaibun(s);
      System.out.println(ans ? "Yes" : "No");
    } String s = sc.next(); s sc.next() sc.next sc int n = s.length(); n s.length() s.length s String a = s.substring(0, n/2); a s.substring(0, n/2) s.substring s 0 n/2 n 2 String b = s.substring(n/2+1, n); b s.substring(n/2+1, n) s.substring s n/2+1 n/2 n 2 1 n boolean ans = isKaibun(a) && isKaibun(b) && isKaibun(s); ans isKaibun(a) && isKaibun(b) && isKaibun(s) isKaibun(a) && isKaibun(b) && isKaibun(s) isKaibun(a) isKaibun a isKaibun(b) isKaibun b isKaibun(s) isKaibun s System.out.println(ans ? "Yes" : "No") System.out.println System.out System System.out ans ? "Yes" : "No" ans "Yes" "No" String[] args args private static boolean isKaibun(String s) {
    boolean ans = true;
    for (int i = 0; i < s.length() / 2; i++) {
      if (s.charAt(i) != s.charAt(s.length() - 1 - i)) ans = false;
    }
    return ans;
  } isKaibun {
    boolean ans = true;
    for (int i = 0; i < s.length() / 2; i++) {
      if (s.charAt(i) != s.charAt(s.length() - 1 - i)) ans = false;
    }
    return ans;
  } boolean ans = true; ans true for (int i = 0; i < s.length() / 2; i++) {
      if (s.charAt(i) != s.charAt(s.length() - 1 - i)) ans = false;
    } int i = 0; int i = 0; i 0 i < s.length() / 2 i s.length() / 2 s.length() s.length s 2 i++ i++ i {
      if (s.charAt(i) != s.charAt(s.length() - 1 - i)) ans = false;
    } {
      if (s.charAt(i) != s.charAt(s.length() - 1 - i)) ans = false;
    } if (s.charAt(i) != s.charAt(s.length() - 1 - i)) ans = false; s.charAt(i) != s.charAt(s.length() - 1 - i) s.charAt(i) s.charAt s i s.charAt(s.length() - 1 - i) s.charAt s s.length() - 1 - i s.length() - 1 - i s.length() s.length s 1 i ans = false ans false return ans; ans String s s public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    try {
      String s = sc.next();
      int n = s.length();

      String a = s.substring(0, n/2);
      String b = s.substring(n/2+1, n);

      boolean ans = isKaibun(a) && isKaibun(b) && isKaibun(s);
      System.out.println(ans ? "Yes" : "No");
    } finally {
      sc.close();
    }
  }

  private static boolean isKaibun(String s) {
    boolean ans = true;
    for (int i = 0; i < s.length() / 2; i++) {
      if (s.charAt(i) != s.charAt(s.length() - 1 - i)) ans = false;
    }
    return ans;
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    try {
      String s = sc.next();
      int n = s.length();

      String a = s.substring(0, n/2);
      String b = s.substring(n/2+1, n);

      boolean ans = isKaibun(a) && isKaibun(b) && isKaibun(s);
      System.out.println(ans ? "Yes" : "No");
    } finally {
      sc.close();
    }
  }

  private static boolean isKaibun(String s) {
    boolean ans = true;
    for (int i = 0; i < s.length() / 2; i++) {
      if (s.charAt(i) != s.charAt(s.length() - 1 - i)) ans = false;
    }
    return ans;
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    try {
      String s = sc.next();
      int n = s.length();

      String a = s.substring(0, n/2);
      String b = s.substring(n/2+1, n);

      boolean ans = isKaibun(a) && isKaibun(b) && isKaibun(s);
      System.out.println(ans ? "Yes" : "No");
    } finally {
      sc.close();
    }
  }

  private static boolean isKaibun(String s) {
    boolean ans = true;
    for (int i = 0; i < s.length() / 2; i++) {
      if (s.charAt(i) != s.charAt(s.length() - 1 - i)) ans = false;
    }
    return ans;
  }
}
