n,x=map(int,input().split()) lst=[0]*x for _ in range(n): a,b=map(int,input().split()) a-=1 i=0 while(a+i=0): if 0<=a+i