import java.util.Scanner;

fun main (args : Array<String>) {
  val input = Scanner(System.`in`)
    
  while (input.hasNext()) {
    val S = input.next()
    val end1 = (S.length - 1) / 2
    val start2 = (S.length + 3) / 2
    var isPalindrom = true
    
    for (i in 0..S.length - 1) {
      if(S[i] != S[S.length - i - 1]) {
        isPalindrom = false
        break
      }
    }
    
    var isPalindrom1 = true
    for (i in 0..end1 - 1) {
      if(S[i] != S[end1 - i - 1]) {
        isPalindrom1 = false
        break
      }
    }
    
    var isPalindrom2 = true
    for (i in start2 - 1..S.length - 1) {
      if(S[i] != S[S.length - i - 1]) {
        isPalindrom2 = false
        break
      }
    }
    
    if (isPalindrom && isPalindrom1 && isPalindrom2) {
      println("Yes")
    } else {
      println("No")
    }
  }
}