program main
  implicit none
  integer :: n, i
  character(100) :: s
  read (*, *) s
  n = len_trim(s)
  if (is_palindrome(trim(s)) .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(str)
    character(*) :: str
    integer :: n, i
    n = len(str)
    is_palindrome = .true.
    do i = 1, n / 2
      if (str(i:i) /= str(n - i + 1:n - i + 1)) is_palindrome = .false.
    end do
  end function is_palindrome
end program main
