N, M = map(int, input().split(" "))
l = [0 for i in range(N)]
r = [0 for i in range(N)]
for i in range(N):
    l[i], r[i] = map(int, input().split(" "))

res = [0 for i in range(M)]

for i in range(N):
    for j in range(M):
        if l[i]%(j+1) ==0 and l[i]//(j+1) == r[i]//(j+1):
            res[j] += 1
        elif l[i]//(j+1) != r[i]//(j+1):
            res[j] += 1

for i in range(M):
    print(res[i])