#coding: UTF-8
import time
N,M=map(int,input().split())
out=[0]*M
for i in range(1,N+1):
    l,r=map(int,input().split())
    for j in range(0,M):
        if r-l>=(j+1):
            out[j]+=1
        elif r%(j+1)==0 or l%(j+1)==0:
            out[j]+=1
for i in range(0,M):
    print(out[i])