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 t = Rational(A[-2], vx) d = t * vy - A[-2] if A[-1] - A[-2] < d puts 'NO' else puts 'YES' end end