n,x,*d=map(int,open(0).read().split()) print(*[max(0,*[d[2*i+1]-abs(j+1-d[2*i])for i in range(n)])for j in range(x)])