x, y = gets.split.map(&:to_i) n = gets.to_i a = gets.split.map(&:to_i) x = Rational(5 * x, 18) y = Rational(5 * y, 18) ans = [] (0...n-1).each do |i| ans << (Rational(a[i], x) <= Rational(a[i+1], y) ? true : false) end puts ans.all?{|b| b == true} ? 'YES' : 'NO'