n,m=map(int,input().split()) ans='Yes' t0,p0=0,0 for _ in range(m): t,p=map(int,input().split()) if t-t0