#include <bits/stdc++.h>
using namespace std;
int n, m;
pair<int, int> a[300010];
int q[100010], rt[100010], L[100010 * 50], R[100010 * 50], t[100010 * 50],
    len = 0;
void add(int pre, int &now, int l, int r, int x) {
  now = ++len;
  t[now] = t[pre] + 1;
  if (l == r) return;
  int mid = (l + r) >> 1;
  if (x <= mid)
    add(L[pre], L[now], l, mid, x), R[now] = R[pre];
  else
    add(R[pre], R[now], mid + 1, r, x), L[now] = L[pre];
}
int query(int p, int l, int r, int ql, int qr) {
  if (!p) return 0;
  if (ql <= l && r <= qr) return t[p];
  int mid = (l + r) >> 1;
  int res = 0;
  if (ql <= mid) res += query(L[p], l, mid, ql, qr);
  if (mid < qr) res += query(R[p], mid + 1, r, ql, qr);
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i].first >> a[i].second;
  }
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; ++i) {
    if (i > 1) {
      for (int j = a[i - 1].first + 1; j < a[i].first; ++j)
        rt[j] = rt[a[i - 1].first];
    }
    add(rt[a[i - 1].first], rt[a[i].first], 1, m, a[i].second);
  }
  for (int j = a[n].first + 1; j <= m; ++j) rt[j] = rt[a[n].first];
  for (int d = 1; d <= m; ++d) {
    int ans = 0;
    for (int i = 1; i * d <= m; ++i) {
      ans += query(rt[i * d], 1, m, i * d, m);
      ans -= query(rt[(i - 1) * d], 1, m, i * d, m);
    }
    printf("%d\n", ans);
  }
  return 0;
}
