s=io.read()
for i=1, (#s-1)/2 do
    if s:sub(i,i) ~= s:sub(-i,-i) then
        print("No")
        return
    end
end

x = s:sub(1, (#s-1)/2)
y = s:sub((#s+3)/2)

for i=1, #x do
    if x:sub(i,i) ~= x:sub(-i,-i) then
        print("No")
        return
    end
end

for i=1, #y do
    if y:sub(i,i) ~= y:sub(-i,-i) then
        print("No")
        return
    end
end

print("Yes")