program string_palindrome
  implicit none
  character(99) :: s
  integer :: n
  read(*,*) s
  n = len_trim(s)
  if (is_palindrome(s(1:n)) .and. &
  & is_palindrome(s(1:(n-1)/2)) .and. &
  & is_palindrome(s((n+3)/2:n))) then
    write(*,'(a)') "Yes"
  else
    write(*,'(a)') "No"
  end if
contains
  logical function is_palindrome(s)
    character(*), intent(in) :: s
    integer :: n, i, j
    n = len_trim(s)
    i = 1
    j = n
    is_palindrome = .true.
    do while (i < j)
      if (s(i:i) /= s(j:j)) then
        is_palindrome = .false.
        return
      end if
      i = i+1
      j = j-1
    end do
  end
end program string_palindrome