#include <bits/stdc++.h>
using namespace std;
struct BIT {
  int dat[1 << 18];
  int n;
  void init(int size) {
    n = size;
    memset(dat, 0, sizeof(dat));
  }
  int sum(int i) {
    int res = 0;
    while (i > 0) {
      res += dat[i];
      i -= i & -i;
    }
    return res;
  }
  void add(int i, int x) {
    while (i <= n) {
      dat[i] += x;
      i += i & -i;
    }
  }
};
struct rBIT : BIT {
  void init(int size) { BIT::init(size); }
  int sum(int i) { return BIT::sum(n - i + 1); }
  void add(int i, int x) { BIT::add(n - i + 1, x); }
};
map<pair<int, int>, int> freq, query;
rBIT tree;
int N, M;
vector<pair<pair<int, int>, int> > a;
void solve() {
  tree.init(M);
  for (int d = 1; d <= M; d++) {
    for (int cur = d, prev = 0; cur <= M; cur += d, prev += d) {
      if (freq[pair<int, int>(cur, cur)] == 0) {
        a.push_back(pair<pair<int, int>, int>(pair<int, int>(cur, 1), cur));
        freq[pair<int, int>(cur, cur)] = 1;
      }
      if (freq[pair<int, int>(prev, cur)] == 0) {
        a.push_back(pair<pair<int, int>, int>(pair<int, int>(prev, 1), cur));
        freq[pair<int, int>(prev, cur)] = 1;
      }
    }
  }
  sort(a.begin(), a.end());
  for (int i = 0; i < a.size(); i++) {
    if (a[i].first.second == 0) {
      tree.add(a[i].second, 1);
    } else {
      int s = tree.sum(a[i].second);
      int x = a[i].first.first;
      int y = a[i].second;
      query[pair<int, int>(x, y)] = s;
    }
  }
  for (int d = 1; d <= M; d++) {
    int ans = 0;
    for (int cur = d, prev = 0; cur <= M; cur += d, prev += d) {
      ans += query[pair<int, int>(cur, cur)] - query[pair<int, int>(prev, cur)];
    }
    cout << ans << endl;
  }
}
int main() {
  cin >> N >> M;
  for (int i = 0; i < N; i++) {
    int l, r;
    cin >> l >> r;
    a.push_back(pair<pair<int, int>, int>(pair<int, int>(l, 0), r));
  }
  solve();
  return 0;
}
