X, Y = gets.split.map(&:to_i) N = gets.to_i A = gets.split.map(&:to_i) puts A.each_cons(2).none?{|i,j| Y * i > j * X } ? :YES : :NO