#include <bits/stdc++.h>
using namespace std;
struct UnionFind {
  vector<int> data;
  UnionFind(int size) : data(size, -1) {}
  bool unionSet(int x, int y) {
    x = root(x);
    y = root(y);
    if (x != y) {
      if (data[y] < data[x]) swap(x, y);
      data[x] += data[y];
      data[y] = x;
    }
    return x != y;
  }
  bool findSet(int x, int y) { return root(x) == root(y); }
  int root(int x) { return data[x] < 0 ? x : data[x] = root(data[x]); }
  int size(int x) { return -data[root(x)]; }
};
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> ls(n);
  vector<int> rs(n);
  vector<int> up(m + 2, 0);
  vector<int> down(m + 2, 0);
  for (int i = 0; i < n; i++) {
    cin >> ls[i] >> rs[i];
    up[ls[i]]++;
    down[rs[i] + 1]++;
  }
  for (int i = 1; i < m + 2; i++) {
    up[i] += up[i - 1];
    down[i] += down[i - 1];
  }
  vector<int> t(m + 1);
  vector<int> max_val(m + 1, 0);
  vector<int> c(m + 1, 0);
  for (int i = 2; i <= m; i++) {
    for (int j = i; j <= m; j += i) {
      int b = (max(max_val[i], down[j]));
      if (up[j] > b) {
        c[i] += up[j] - b;
      }
      max_val[i] = up[j];
    }
  }
  cout << up[m + 1] << endl;
  for (int i = 2; i <= m; i++) {
    cout << c[i] << endl;
  }
  return 0;
}
