N, M = gets.split.map(&:to_i) Q = M.times.map { gets.split.map(&:to_i) } time = 0 cur = 0 Q.each do |t, q| limit = (cur - q).abs if t - time < limit puts 'No' exit end time = t end puts 'Yes'