program abc159b
  implicit none
  integer :: i, l
  character :: a, b, c
  character(3) :: ans = 'Yes'
  character(100) :: s
  read *, s
  l = len_trim(s)
  do i = 1,l/2
     a = s(i:i)
     b = s(l+1-i:l+1-i)
     c = s(l/2+1+i:l/2+1+i)
     if (a/=b.or.a/=c) then
        ans = 'No'
        exit
     end if
  end do
  print *, ans
end program abc159b
