program main
  implicit none
  integer A, B, C
  read(*, *) A, B, C
  if (C<A .and. C<B) then
    write(*,'(A)') 'No'
  elseif (C>A .and. C>B) then
    write(*,'(A)') 'No'
  else
    write(*,'(A)') 'Yes'
  end if
end program main
