#include <bits/stdc++.h>
using namespace std;
long long N;
long long data[530000], datb[530000];
void init(long long n_) {
  N = 1;
  while (N < n_) N *= 2;
}
void add(long long a, long long b, long long x, long long k, long long l,
         long long r) {
  if (a <= l && r <= b) {
    data[k] += x;
  } else if (l < b && a < r) {
    datb[k] += (min(b, r) - max(a, l)) * x;
    add(a, b, x, k * 2 + 1, l, (l + r) / 2);
    add(a, b, x, k * 2 + 2, (l + r) / 2, r);
  }
}
long long sum(long long a, long long b, long long k, long long l, long long r) {
  if (b <= l || r <= a) {
    return 0;
  } else if (a <= l && r <= b) {
    return data[k] * (r - l) + datb[k];
  } else {
    long long res = (min(b, r) - max(a, l)) * data[k];
    res += sum(a, b, k * 2 + 1, l, (l + r) / 2);
    res += sum(a, b, k * 2 + 2, (l + r) / 2, r);
    return res;
  }
}
signed main() {
  long long n, m;
  cin >> n >> m;
  init(m);
  long long kakujitu = n;
  priority_queue<pair<long long, pair<long long, long long> > > que;
  for (long long i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    que.push(make_pair(x - y - 1, make_pair(x, y)));
  }
  for (long long i = 1; i <= m; i++) {
    long long ans = 0;
    while (!que.empty() && -1 * que.top().first < i) {
      pair<long long, long long> P = que.top().second;
      que.pop();
      kakujitu--;
      long long cl = P.first;
      long long cr = P.second;
      add(cl, cr + 1, 1, 0, 0, N);
    }
    for (long long j = 1; j * i <= m; j++) {
      ans += sum(j * i, j * i + 1, 0, 0, N);
    }
    ans += kakujitu;
    cout << ans << endl;
  }
  return 0;
}
