start, dist, stopover = gets.strip.split.map(&:to_i)
if start < dist
  if stopover.between?(start, dist)
    puts 'Yes'
  else
    puts 'No'
  end
else
  if stopover.between?(dist, start)
    puts 'Yes'
  else
    puts 'No'
  end
end