#include <bits/stdc++.h>
using namespace std;
int n, m, ans;
int l[(int)1e5 + 1], r[(int)1e5 + 1];
pair<int, int> lr[(int)1e5 + 1];
vector<int> vec[(int)1e5 + 10];
int bit[(int)1e5 + 1];
int sum(int i, int *b) {
  int s = 0;
  while (i > 0) {
    s += b[i];
    i = i & (i - 1);
  }
  return s;
}
void add(int i, int x, int *b) {
  while (i <= m) {
    b[i] += x;
    i += i & -i;
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> lr[i].second >> lr[i].first;
    l[i] = lr[i].second;
    r[i] = lr[i].first;
    lr[i].first = lr[i].first - lr[i].second + 1;
  }
  sort(lr, lr + n);
  int p1 = 0, p2 = 0;
  for (int i = 1; i <= m; i++) {
    ans = 0;
    p2 = lower_bound(lr, lr + n, make_pair(i, 0)) - lr;
    ans = n - p2;
    for (int j = p1; j < p2; j++) {
      add(lr[j].second, 1, bit);
      add(lr[j].first + lr[j].second, -1, bit);
    }
    p1 = p2;
    for (int j = 0; j <= m; j += i) {
      ans += sum(j, bit);
    }
    cout << ans << endl;
  }
  return 0;
}
