#include <bits/stdc++.h>
using namespace std;
struct data {
  int l, r, ind;
} arr[3 * 100010];
int tree[4 * 100010], lazy[4 * 100010], ans[100010];
vector<pair<int, int>> v;
void update(int x, int y, int val, int l, int r, int node) {
  if (lazy[node]) {
    tree[node] += lazy[node];
    if (l != r) {
      lazy[node << 1] += lazy[node];
      lazy[node << 1 | 1] += lazy[node];
    }
    lazy[node] = 0;
  }
  if (r < x || l > y) return;
  if (l >= x && r <= y) {
    tree[node] += val;
    if (l != r) {
      lazy[node << 1] += val;
      lazy[node << 1 | 1] += val;
    }
    return;
  }
  int mid = (l + r) >> 1;
  update(x, y, val, l, mid, node << 1);
  update(x, y, val, mid + 1, r, node << 1 | 1);
  tree[node] = tree[node << 1] + tree[node << 1 | 1];
}
int query(int id, int l, int r, int node) {
  if (lazy[node]) {
    tree[node] += lazy[node];
    if (l != r) {
      lazy[node << 1] += lazy[node];
      lazy[node << 1 | 1] += lazy[node];
    }
    lazy[node] = 0;
  }
  if (l == r) return tree[node];
  int mid = (l + r) >> 1;
  if (id <= mid)
    return query(id, l, mid, node << 1);
  else
    return query(id, mid + 1, r, node << 1 | 1);
}
int main() {
  int n, m, le, ri, id;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> le >> ri;
    arr[i].l = le;
    arr[i].r = ri;
    arr[i].ind = i;
    v.push_back(make_pair(ri - le + 1, i));
  }
  sort(v.begin(), v.end());
  for (int d = m; d >= 1; d--) {
    id = lower_bound(v.begin(), v.end(), make_pair(d, 0)) - v.begin();
    id--;
    ans[d] = v.size() - id - 1;
    for (int i = 0; i <= id; i++) {
      update(arr[v[i].second].l, arr[v[i].second].r, 1, 0, m, 1);
    }
    for (int i = 0; i <= m; i += d) {
      ans[d] += query(i, 0, m, 1);
    }
    for (int i = 0; i <= id; i++) {
      update(arr[v[i].second].l, arr[v[i].second].r, -1, 0, m, 1);
    }
  }
  for (int i = 1; i <= m; i++) {
    cout << ans[i] << endl;
  }
  return 0;
}
