a,b=0,0 for _ in [0]*int(input().split()[1]): c,d=map(int,input().split()) if (c-a)