import Foundation

func terms1(s:String) -> Bool {
    return s == String(s.reversed())
}

func terms2(s:String) -> Bool {
    return s.prefix((s.count - 1) / 2) == String(s.prefix((s.count - 1) / 2).reversed())
}

func terms3(s:String) -> Bool {
    return s.suffix(s.count - (s.count + 3) / 2 + 1) == s.suffix(s.count - (s.count + 3) / 2 + 1).reversed()
}



func main() {
    let s = readLine()!
    
    print(terms1(s: s) && terms2(s: s) && terms3(s: s) ? "Yes": "No")
}
main()
