N,M=map(int,raw_input().split(" "))
items=[]
for _ in range(0,N):
    items.append(map(int,raw_input().split(" ")))

for d in range(1,M+1):
    isget=[False]*N
    for k in range(0,M+1,d):
        for i,item in enumerate(items):
            isget[i]=item[0]<=k<=item[1] or isget[i]
    print sum(isget)



