#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 100;
const int mod = 1e9 + 7;
long long BIT[maxn];
long long ops[maxn];
int f[maxn];
vector<pair<long long, long long> > inters;
vector<long long> strt;
vector<pair<pair<long long, long long>, pair<long long, long long> > > v;
long long ans[maxn];
stack<pair<long long, long long> > stk;
vector<pair<long long, long long> > a;
long long max(long long x, long long y) { return (x > y ? x : y); }
long long min(long long x, long long y) { return (x < y ? x : y); }
long long sum(int ind) {
  ind++;
  long long s = 0;
  while (ind > 0) {
    s += BIT[ind];
    ind -= ind & (-ind);
  }
  return s;
}
void update(long long x, long long ind, long long sz) {
  ind++;
  while (ind <= sz) {
    BIT[ind] += x;
    ind += ind & (-ind);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, q, nn, mm;
  cin >> nn >> mm;
  n = mm + 1;
  for (int i = 0; i < nn; i++) {
    int t1, t2;
    cin >> t1 >> t2;
    f[t1]++;
    inters.push_back(make_pair(t1, t2));
  }
  sort(inters.begin(), inters.end());
  for (int i = 0; i < inters.size(); i++) {
    a.push_back(make_pair(inters[i].second, i));
    strt.push_back(inters[i].first);
  }
  int hgt = 0;
  for (int i = 0; i <= mm; i++) {
    ops[i] = f[i] + hgt;
    hgt = ops[i];
  }
  int g = 0;
  for (int i = 0; i < mm; i++) {
    long long cmt = ops[0];
    g++;
    for (int j = g; j <= mm; j += g) {
      long long yp = ops[j] - ops[j - g];
      cmt += yp;
      long long t, b, k;
      k = j;
      b = upper_bound(strt.begin(), strt.end(), j) - strt.begin();
      t = upper_bound(strt.begin(), strt.end(), j - g) - strt.begin();
      b--;
      if (b < t) {
        continue;
      }
      v.push_back(make_pair(make_pair(k, i), make_pair(t, b)));
    }
    ans[i] = cmt;
  }
  sort(v.begin(), v.end());
  sort(a.begin(), a.end());
  for (int i = n - 1; i >= 0; i--) {
    stk.push(a[i]);
  }
  for (int i = 0; i < v.size(); i++) {
    long long u = v[i].first.first;
    long long id = v[i].first.second;
    while (stk.size() && stk.top().first < u) {
      update(1, stk.top().second, n + 1);
      stk.pop();
    }
    int l = v[i].second.first;
    int r = v[i].second.second;
    l--;
    if (id == 2) {
    }
    if (l == -1) {
      ans[id] -= sum(r);
      continue;
    }
    ans[id] -= (sum(r) - sum(l));
  }
  for (int i = 0; i < mm; i++) {
    cout << ans[i] << endl;
  }
  return 0;
}
