#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
inline void setin(string s) { freopen(s.c_str(), "r", stdin); }
inline void setout(string s) { freopen(s.c_str(), "w", stdout); }
template <typename T>
inline T range(T l, T r) {
  return uniform_int_distribution<T>(l, r)(rng);
}
template <typename T>
void Min(T &a, T b) {
  a = min(a, b);
}
template <typename T>
void Max(T &a, T b) {
  a = max(a, b);
}
template <typename T>
ostream &operator<<(ostream &cout, vector<T> x) {
  for (auto it = x.begin(); it != x.end(); ++it) {
    if (it == x.begin())
      cout << "{" << *it;
    else
      cout << ", " << *it;
  }
  cout << "}";
  return cout;
}
template <typename T>
ostream &operator<<(ostream &cout, set<T> x) {
  for (auto it = x.begin(); it != x.end(); ++it) {
    if (it == x.begin())
      cout << "{" << *it;
    else
      cout << ", " << *it;
  }
  cout << "}";
  return cout;
}
const int inf = 0x3f3f3f3f;
const int mod = 998244353;
const int N = 3e5 + 15;
int n, m;
pair<int, int> a[N];
struct node {
  node *l, *r;
  int val;
  node(node *_l, node *_r) {
    l = _l, r = _r;
    val = (l ? l->val : 0) + (r ? r->val : 0);
  }
  node(int val) : val(val) { l = r = NULL; }
};
typedef node *pnode;
vector<pnode> root = {NULL};
pnode update(pnode t, int tl, int tr, int pos, int val) {
  if (tl == tr) return new node((t ? t->val : 0) + val);
  int mid = tl + tr >> 1;
  if (pos <= mid)
    return new node(update((t ? t->l : NULL), tl, mid, pos, val),
                    (t ? t->r : NULL));
  return new node((t ? t->l : NULL),
                  update((t ? t->r : NULL), mid + 1, tr, pos, val));
}
void update_no_new(pnode &t, int tl, int tr, int pos, int val) {
  if (!t) t = new node(0);
  if (tl == tr) {
    t->val += val;
    return;
  }
  int mid = tl + tr >> 1;
  if (pos <= mid)
    update_no_new(t->l, tl, mid, pos, val);
  else
    update_no_new(t->r, mid + 1, tr, pos, val);
  t->val = (t->l ? t->l->val : 0) + (t->r ? t->r->val : 0);
}
int get(pnode t, int tl, int tr, int l, int r) {
  if (tl > r || tr < l || !t) return 0;
  if (tl >= l && tr <= r) return t->val;
  int mid = tl + tr >> 1;
  return get(t->l, tl, mid, l, r) + get(t->r, mid + 1, tr, l, r);
}
vector<int> is;
inline int get(int i, int x) {
  int ind = upper_bound(is.begin(), is.end(), i) - is.begin() - 1;
  return get(root[ind], 1, m, x, m);
}
int main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) cin >> a[i].first >> a[i].second;
  sort(a + 1, a + 1 + n);
  int last = -1;
  is.push_back(-1);
  for (int i = 1; i <= n; ++i) {
    if (last == a[i].first)
      update_no_new(root.back(), 1, m, a[i].second, 1);
    else {
      root.push_back(update(root.back(), 1, m, a[i].second, 1));
      is.push_back(a[i].first);
    }
    last = a[i].first;
  }
  for (int i = 1; i <= m; ++i) {
    int ans = 0;
    for (int j = i; j <= m; j += i) ans += get(j, j) - get(j - i, j);
    cout << ans << '\n';
  }
  return 0;
}
