#include <bits/stdc++.h>
using namespace std;
int dx[8] = {0, 0, -1, 1, 1, 1, -1, -1};
int dy[8] = {-1, 1, 0, 0, 1, -1, 1, -1};
const int SIZE = 300050;
vector<int> node;
struct SegmentTreeSum {
 private:
  int n;
  vector<int> node;

 public:
  SegmentTreeSum(vector<int> v) {
    int sz = v.size();
    n = 1;
    while (n < sz) n *= 2;
    node.resize(2 * n - 1, 0);
    for (int i = 0; i < sz; i++) node[i + n - 1] = v[i];
    for (int i = n - 2; i >= 0; i--)
      node[i] = (node[2 * i + 1] + node[2 * i + 2]);
  }
  void update(int x, int val) {
    x += (n - 1);
    node[x] = val;
    while (x > 0) {
      x = (x - 1) / 2;
      node[x] = (node[2 * x + 1] + node[2 * x + 2]);
    }
  }
  int getsum(int a, int b, int k = 0, int l = 0, int r = -1) {
    if (r < 0) r = n;
    if (r <= a || b <= l) return 0;
    if (a <= l && r <= b) return node[k];
    int vl = getsum(a, b, 2 * k + 1, l, (l + r) / 2);
    int vr = getsum(a, b, 2 * k + 2, (l + r) / 2, r);
    return (vl + vr);
  }
};
int main() {
  int N, M;
  cin >> N >> M;
  multiset<tuple<int, int, int> > Q;
  for (int i = 0; i < N; i++) {
    int l, r;
    cin >> l >> r;
    Q.insert(make_tuple(l, 0, r));
  }
  for (int i = 1; i <= M; i++) {
    for (int j = i; j <= M; j += i) {
      int a = j - i, b = j;
      if (Q.find(make_tuple(b, 1, b)) == Q.end()) Q.insert(make_tuple(b, 1, b));
      if (Q.find(make_tuple(a, 1, b)) == Q.end()) Q.insert(make_tuple(a, 1, b));
    }
  }
  for (int i = 0; i <= M + 1; i++) node.push_back(0);
  SegmentTreeSum S(node);
  map<pair<int, int>, int> pam;
  for (tuple<int, int, int> T : Q) {
    int a, b, c;
    tie(a, c, b) = T;
    if (c == 0)
      S.update(b, S.getsum(b, b + 1) + 1);
    else {
      pam[make_pair(a, b)] = S.getsum(b, M + 1);
    }
  }
  for (int i = 1; i <= M; i++) {
    int ans = 0;
    for (int j = i; j <= M; j += i) {
      int a = j - i, b = j;
      ans += pam[make_pair(b, b)] - pam[make_pair(a, b)];
    }
    cout << ans << endl;
  }
  return 0;
}
