program StringPalindrome
  implicit none

  character(99) :: cha
  integer :: n, i
  logical :: log

  read(*,*) cha
  n = len_trim(cha)
  log = .true.

  do i = 1, (n-1)/2
     if(cha(i:i) /= cha(n-i+1:n-i+1)) then
        log = .false.
        exit
     end if
     if(i <= (n-1)/4) then
        if(cha(i:i) /= cha((n-1)/2-i+1:(n-1)/2-i+1)) then
           log = .false.
           exit
        end if
        if(cha(i+(n+1)/2:i+(n+1)/2) /= cha(n-i+1:n-i+1)) then
           log = .false.
           exit
        end if
     end if
  end do

  if(log .eqv. .true.) then
     print *, 'Yes'
  else
     print *, 'No'
  end if

  stop
end program StringPalindrome
