#include <bits/stdc++.h>
using namespace std;
struct Segtree {
  long long n;
  vector<long long> data;
  vector<long long> lazy;
  void build_rec(long long node, long long* begin, long long* end) {
    if (end == begin + 1) {
      if (data.size() <= node) data.resize(node + 1);
      data[node] = *begin;
    } else {
      long long* mid = begin + (end - begin + 1) / 2;
      build_rec(2 * node + 1, begin, mid);
      build_rec(2 * node + 2, mid, end);
      data[node] = data[2 * node + 1] + data[2 * node + 2];
    }
  }
  void discharge(int node, int a, int c) {
    lazy[2 * node + 1] += lazy[node];
    lazy[2 * node + 2] += lazy[node];
    data[node] += (c - a) * lazy[node];
    lazy[node] = 0;
    return;
  }
  void update_range_rec(long long node, long long tbegin, long long tend,
                        long long abegin, long long aend, long long val) {
    if (tbegin >= abegin && tend <= aend) {
      lazy[node] += val;
    } else {
      long long mid = tbegin + (tend - tbegin + 1) / 2;
      discharge(node, tbegin, tend);
      if (mid > abegin && tbegin < aend)
        update_range_rec(2 * node + 1, tbegin, mid, abegin, aend, val);
      if (tend > abegin && mid < aend)
        update_range_rec(2 * node + 2, mid, tend, abegin, aend, val);
      data[node] = data[2 * node + 1] + data[2 * node + 2];
    }
  }
  long long query_rec(long long node, long long tbegin, long long tend,
                      long long abegin, long long aend) {
    if (tbegin >= abegin && tend <= aend) {
      discharge(node, tbegin, tend);
      return data[node];
    } else {
      long long mid = tbegin + (tend - tbegin + 1) / 2;
      discharge(node, tbegin, tend);
      long long res = 0;
      if (mid > abegin && tbegin < aend)
        res += query_rec(2 * node + 1, tbegin, mid, abegin, aend);
      if (tend > abegin && mid < aend)
        res += query_rec(2 * node + 2, mid, tend, abegin, aend);
      return res;
    }
  }
  Segtree(long long* begin, long long* end) : n(end - begin) {
    build_rec(0, begin, end);
    lazy.assign(data.size(), 0);
  }
  void update_range(long long begin, long long end, long long val) {
    update_range_rec(0, 0, n, begin, end, val);
  }
  long long query(long long begin, long long end) {
    return query_rec(0, 0, n, begin, end);
  }
};
bool comp(pair<long long, long long> x, pair<long long, long long> y) {
  return (x.second - x.first) < (y.second - y.first);
}
int main() {
  long long n, m;
  cin >> n >> m;
  vector<pair<long long, long long> > a(n);
  long long b[m + 5];
  for (long long i = 0; i < m + 5; i++) b[i] = 0;
  Segtree seg(b, b + m + 5);
  for (long long i = 0; i < n; i++) cin >> a[i].first >> a[i].second;
  sort(a.begin(), a.end(), comp);
  long long k = 0;
  vector<long long> ans(m + 1, 0);
  for (long long i = 1; i <= m; i++) {
    while (k < n && a[k].second - a[k].first + 1 < i) {
      seg.update_range(a[k].first, a[k].second + 1, 1);
      k++;
    }
    for (long long j = i; j <= m; j += i) {
      ans[i] += seg.query(j, j + 1);
    }
    ans[i] += n - k;
  }
  for (long long i = 1; i <= m; i++) cout << ans[i] << endl;
}
