N, M = map(int, input().split())

d = [0] * (M + 1)

for i in range(N):
    l, r = map(int, input().split())
    for m in range(1, M + 1):
        if (l % m == 0 or m - (l % m) <= r - l):
            d[m] += 1

print(*d[1:], sep='\n')
    