x, y = gets.split.map(&:to_i) n = gets.to_i a = gets.split.map(&:to_i) (n - 1).times do |i| if a[i] * y > a[i + 1] * x puts "NO" exit end end puts "YES"