X, Y = gets.split.map(&:to_i) N = gets.to_i A = gets.split.map(&:to_i) vx = Rational(X, 3600) vy = Rational(Y, 3600) if N <= 1 puts 'YES' else A.each_cons(2) do |a1, a2| t = Rational(a1, vx) d = t * vy - a1 if a2 - a1 < d puts 'NO' exit end end puts 'YES' end