#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v[100010];
int bit[100010], n, m;
void add(int x, int k) {
  while (x <= m + 1) {
    bit[x] += k;
    x += x & -x;
  }
}
int sum(int x) {
  int s = 0;
  while (x) {
    s += bit[x];
    x -= x & -x;
  }
  return s;
}
int main() {
  cin >> n >> m;
  memset(bit, 0, m + 1);
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    v[b - a + 1].push_back(make_pair(a, b));
  }
  for (int k = 1; k <= m; k++) {
    for (int i = 0; i < v[k - 1].size(); i++) {
      add(v[k - 1][i].first, 1);
      add(v[k - 1][i].second + 1, -1);
      n--;
    }
    int cnt = n;
    for (int i = k; i <= m; i += k) {
      cnt += sum(i);
    }
    cout << cnt << endl;
  }
  return 0;
}
