import sys

input_methods=['clipboard','file','key']
using_method=1
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007

#+++++

def main():
	m, n = tin()
	imos = [0]*(n+2)
	for _ in range(m):
		l, r = tin()
		dist = r - l
		min_r=r
		if 1+dist+1 < l:
			imos[1]+=1
			imos[1+dist+1] +=-1
			imos[l]+=1
			imos[r+1]-=1
			for i in range(1, r+1): #int(r**0.5)+1+dist):
				#pa(imos)
				if r % i <= dist:
					#pa(('i',i))
					if 1+dist+1 <= i and i < l:
						imos[i]+=1
						imos[i+1]-=1
					rr=(r//i)
					if rr <= i:
						break
					if 1+dist+1 <= rr and rr < l:
						#pa(rr)
						imos[rr]+=1
						imos[rr+1]-=1
		else:
			#pa('hhh')
			imos[1]+=1
			imos[r+1]+=-1
		#pa(imos)
	
	ret=0
	for v in imos[1:-1]:
		ret += v
		print(ret)
		
def main_onm():
	#O(nm)
	m, n = tin()
	imos = [0]*(n+1)
	for _ in range(m):
		l, r = tin()
		dist = r - l
		for i in range(1, min(n, r)+1):
			if r % i <= dist:
				imos[i]+=1

	ret=0
	#print(imos)
	for v in imos[1:]:
		#ret += v
		print(v)

def main2():
	k, n = tin()
	imos = [0]*(n+1)
	#b , c = tin()
	#s = input()
	for _ in range(k):
		l, r = tin()
		dist = r - l
		imos[0]+=1
		pre = dist+1
		pa(('dist:',dist))
		for i in range(2, int(r**0.5)+1):
			if r % i <= dist:
				pa(('i:',i))
				if pre > i - dist:
					pass
				else:
					imos[pre]-=1
					imos[(i-1) - dist]+=1
				pre = r
		else:
			if pre > r - dist:
				pass
			else:
				imos[pre]-=1
				imos[(r-1) - dist]+=1
			pre = r
			imos[pre] -= 1
					
	ret=0
	print(imos)
	for v in imos:
		ret += v
		print(ret)
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)