program main
  implicit none
  integer :: a, b, c
  logical :: flag = .false.
  read *, a, b, c

  if ((a <= c) .and. (b >= c)) flag = .true.
  if ((a >= c) .and. (b <= c)) flag = .true.

  if (flag) then
    print '(a)', 'Yes'
  else
    print '(a)', 'No'
  end if

end program