#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int MAX = 1e5 + 5;
vector<pair<int, pair<int, int> > > v;
int n, m, t[MAX];
void update(int l, int r, int value) {
  for (l += m + 1, r += m + 1; l < r; l >>= 1, r >>= 1) {
    if (l & 1) t[l++] += value;
    if (r & 1) t[--r] += value;
  }
}
int query(int p) {
  int res = 0;
  for (p += m + 1; p > 0; p >>= 1) res += t[p];
  return res;
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    int l, r;
    cin >> l >> r;
    l--;
    r--;
    v.push_back(make_pair(r - l + 1, make_pair(l, r)));
  }
  sort(v.begin(), v.end());
  int j = 0;
  for (int i = 1; i <= m; i++) {
    while (j < n && v[j].first < i) {
      update(v[j].second.first, v[j].second.second + 1, 1);
      j++;
    }
    int ans = n - j;
    for (int k = i - 1; k <= m; k += i) {
      ans += query(k);
    }
    cout << ans << "\n";
  }
  return 0;
}
