output_description: Print the answer in M lines. The i-th line should contain the maximum number
  of the kinds of souvenirs that can be purchased if one takes a train stopping
  every i-th station.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      N M
      l_1 r_1
      :
      l_{N} r_{N}
attempt: import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
  
  sys.setrecursionlimit(10**7)
  inf = 10**20
  eps = 1.0 / 10**15
  mod = 10**9 + 7
  
  
  def LI():
      return [int(x) for x in sys.stdin.readline().split()]
  
  
  def LI_():
      return [int(x) - 1 for x in sys.stdin.readline().split()]
  
  
  def LF():
      return [float(x) for x in sys.stdin.readline().split()]
  
  
  def LS():
      return sys.stdin.readline().split()
  
  
  def I():
      return int(sys.stdin.readline())
  
  
  def F():
      return float(sys.stdin.readline())
  
  
  def S():
      return input()
  
  
  def pf(s):
      return print(s, flush=True)
  
  
  class BIT:
      def __init__(self, n):
          i = 1
          while 2**i <= n:
              i += 1
          self.H = i
          self.N = 2**i
          self.A = [0] * self.N
  
      def find(self, i):
          r = 0
          while i:
              r += self.A[i]
              i -= i & (i - 1) ^ i
          return r
  
      def update(self, i, x):
          while i < self.N:
              self.A[i] += x
              i += i & (i - 1) ^ i
  
      def query(self, a, b):
          return self.find(b - 1) - self.find(a - 1)
  
  
  def main():
      n, m = LI()
      d = collections.defaultdict(list)
      for _ in range(n):
          l, r = LI()
          d[r - l + 1].append((l, r))
      r = [n]
      bit = BIT(n + 3)
      c = n
      for i in range(2, m + 1):
          for a, b in d[i - 1]:
              c -= 1
              bit.update(a, 1)
              bit.update(b + 1, -1)
          t = c
          for j in range(i, m + 1, i):
              t += bit.find(j)
          r.append(t)
  
      return "\n".join(map(str, r))
  
  
  print(main())
  
problem_description: Statement
  
  Snuke has decided to play a game, where the player runs a railway company.
  There are M+1 stations on Snuke Line, numbered 0 through M. A train on Snuke
  Line stops at station 0 and every d-th station thereafter, where d is a
  predetermined constant for each train. For example, if d = 3, the train stops
  at station 0, 3, 6, 9, and so forth.
  
  There are N kinds of souvenirs sold in areas around Snuke Line. The i-th kind
  of souvenirs can be purchased when the train stops at one of the following
  stations: stations l_i, l_i+1, l_i+2, ..., r_i.
  
  There are M values of d, the interval between two stops, for trains on Snuke
  Line: 1, 2, 3, ..., M. For each of these M values, find the number of the
  kinds of souvenirs that can be purchased if one takes a train with that value
  of d at station 0. Here, assume that it is not allowed to change trains.
samples: [{"input": "3 3\n    1 2\n    2 3\n    3 3", "output": "3\n    2\n    2\n    \n\n  * If one takes a train stopping every station, three kinds of souvenirs can be purchased: kind 1, 2 and 3.\n  * If one takes a train stopping every second station, two kinds of souvenirs can be purchased: kind 1 and 2.\n  * If one takes a train stopping every third station, two kinds of souvenirs can be purchased: kind 2 and 3.\n\n* * *"}, {"input": "7 9\n    1 7\n    5 9\n    5 7\n    5 9\n    1 1\n    6 8\n    3 4", "output": "7\n    6\n    6\n    5\n    4\n    5\n    5\n    3\n    2"}]