#include <bits/stdc++.h>
using namespace std;
int l[300009], r[300009];
int t[100009], m, n;
void add(int x, int y) {
  for (; x <= m; x += x & -x) t[x] += y;
}
int get(int x) {
  int res = 0;
  for (; x; x -= x & -x) res += t[x];
  return res;
}
pair<long long, long long> c[300009];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) {
    cin >> l[i] >> r[i];
    c[i] = make_pair(r[i] - l[i] + 1, i);
  }
  sort(c + 1, c + n + 1);
  int j = 1;
  for (int i = 1; i <= m; ++i) {
    while (c[j].first < i && j <= n) {
      int t = c[j].second;
      add(l[t], 1);
      add(r[t] + 1, -1);
      ++j;
    }
    int res = n - j + 1;
    for (int t = 0; t <= m; t += i) res += get(t);
    cout << res << '\n';
  }
  return 0;
}
