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