import Foundation

let input = readLine()!
let N = input.count

let firstString  = input
let endString = input

let firstPalindrome = input.dropLast((N - 1) / 2 + 1).map{ String($0)}
let endPalindrome = input.dropFirst((N + 3) / 2 - 1).map{ String($0)}

let StringNums = firstString.count
let halfNums = StringNums / 2

var firstReversed: [String] = []
var endReversed: [String] = []


for i in (0...halfNums - 1).reversed() {
    firstReversed.append(firstPalindrome[i])
    endReversed.append(endPalindrome[i])
}

if firstPalindrome == firstReversed && endPalindrome == endReversed {
    print("Yes")
} else {
    print("No")
}
