def snuke_line():
	n, m = map(int, raw_input().split(" "))
	souvenirs = []
	for i in range(n):
		souvenirs.append(map(int, raw_input().split(" ")))
	# print souvenirs
	stations = list(range(m+1))
	for d in range(1, m+1):
		passed_stations = stations[::d]
		s_count = 0
		for s_interval in souvenirs:
			tag = False
			for s in passed_stations:
				if s>=s_interval[0] and s<=s_interval[1]:
					tag = True
					break
			if tag:
				s_count+=1
		print s_count


if __name__ == "__main__":
	snuke_line()