#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;
struct BIT {
 private:
  int n;
  vector<int> node;

 public:
  BIT(int N) {
    node.resize(N + 1, 0);
    n = N;
  }
  int sum(int i) {
    if (!i) return 0;
    return node[i] + sum(i - (i & -i));
  }
  void add(int i, int x) {
    if (i > n) return;
    node[i] += x;
    add(i + (i & -i), x);
  }
};
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));
    }
  }
  BIT B(M + 2);
  vector<unordered_map<int, int>> pam(M + 2);
  for (tuple<int, int, int> T : Q) {
    int a, b, c;
    tie(a, c, b) = T;
    if (c == 0) {
      B.add(b + 1, 1);
    } else {
      pam[a][b] = B.sum(M + 1) - B.sum(b);
    }
  }
  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[b][b] - pam[a][b];
    }
    cout << ans << endl;
  }
  return 0;
}
