#include <bits/stdc++.h>
using namespace std;
const int BIT_MAX = 300010;
template <class T>
class BIT {
  T x[BIT_MAX + 1];

 public:
  BIT() { fill(x, x + BIT_MAX + 1, 0); }
  void add(int a, T b) {
    for (; a <= BIT_MAX; a += a & -a) x[a] += b;
  }
  T get(int a) {
    T b = 0;
    for (; a > 0; a -= a & -a) b += x[a];
    return b;
  }
};
BIT<int> bit;
int N, M;
int ans[3333];
int main() {
  scanf("%d%d", &N, &M);
  for (int i = (int)(0); i < (int)(N); ++i) {
    int l, r, x, y, s, t;
    scanf("%d%d", &l, &r);
    x = l;
    y = r;
    for (int j = (int)(2); j < (int)(351); ++j) {
      int s = (l - 1) / j + 1;
      int t = r / j;
      if (s > t) break;
      if (x <= t + 1) {
        x = s;
      } else {
        bit.add(x, 1);
        bit.add(y + 1, -1);
        x = s;
        y = t;
      }
      if (x < 352) break;
    }
    bit.add(x, 1);
    bit.add(y + 1, -1);
    for (int j = (int)(1); j < (int)(351); ++j) {
      if (r - l + 1 >= j || l % j > r % j || l % j == 0) ++ans[j];
    }
  }
  int z = min(351, M + 1);
  for (int i = (int)(1); i < (int)(z); ++i) {
    printf("%d\n", ans[i]);
  }
  for (int i = (int)(351); i < (int)(M + 1); ++i) {
    printf("%d\n", bit.get(i));
  }
  return 0;
}
