using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { var input = Console.ReadLine().Split().Select(long.Parse).ToArray(); var N = input[0]; var M = input[1]; var list = new List(); for (int i = 0; i < M; i++) { var temp = Console.ReadLine().Split().Select(long.Parse).ToArray(); list.Add(temp); } list = list.OrderBy(x => x[0]).ToList(); var current = 0L; var ans = "Yes"; foreach (var item in list) { if (Math.Abs(item[1] - current) > item[0]) { ans = "No"; break; } current = item[1]; } Console.WriteLine(ans); } }