#include <bits/stdc++.h>
using namespace std;
int T[300010], n, m;
void update(int l, int r) {
  for (int i = r; i; i -= (i & -i)) T[i]++;
  for (int i = l - 1; i; i -= (i & -i)) T[i]--;
}
int read(int x) {
  int res = 0;
  for (int i = x; i <= m; i += (i & -i)) res += T[i];
  return res;
}
void solve() {
  scanf("%d%d", &n, &m);
  pair<int, int> p[100010];
  for (int i = 0; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    p[i] = pair<int, int>(x, y);
  }
  sort(p, p + n, [&](pair<int, int> a, pair<int, int> b) {
    return (a.second - a.first) < (b.second - b.first);
  });
  for (int i = 1, j = 0; i <= m; i++) {
    while (j < n && p[j].second - p[j].first < i) {
      update(p[j].first, p[j].second);
      ++j;
    }
    int cnt = n - j;
    for (int k = i; k <= m; k += i) {
      cnt += read(k);
    }
    printf("%d\n", cnt);
  }
}
int main() {
  int Tc = 1;
  for (int tc = 1; tc <= Tc; tc++) {
    solve();
  }
  return 0;
}
