#include <bits/stdc++.h>
using namespace std;
class BIT {
  static const int MAX_N = 1 << 18;
  int n, bit[MAX_N + 1];

 public:
  BIT(int n_) {
    n = n_;
    for (int i = 0; i < n + 1; i++) bit[i] = 0;
  }
  int sum(int i) {
    int s = 0;
    while (i > 0) {
      s += bit[i];
      i -= i & (-i);
    }
    return s;
  }
  void add(int i, int x) {
    while (i <= n) {
      bit[i] += x;
      i += i & (-i);
    }
  }
};
struct ST {
  int type;
  int l, r;
};
bool operator<(const ST& a, const ST& b) {
  if (a.l == b.l) return a.type < b.type;
  return a.l < b.l;
}
int main() {
  ios::sync_with_stdio(false);
  int N, M;
  cin >> N >> M;
  vector<ST> pts;
  for (int i = (0); i < (int)(N); i++) {
    int l, r;
    cin >> l >> r;
    pts.push_back((ST){0, l, r});
  }
  map<pair<int, int>, int> query;
  for (int d = 1; d <= M; d++) {
    for (int p = 1; d * (long long)p <= M; p++) {
      int X = d * (p - 1);
      int Y = d * p;
      if (query.count(make_pair(X, Y - 1)) == 0) {
        query[make_pair(X, Y - 1)] = 1;
      }
      if (query.count(make_pair(X, 100005)) == 0) {
        query[make_pair(X, 100005)] = 1;
      }
      if (query.count(make_pair(Y, Y - 1)) == 0) {
        query[make_pair(Y, Y - 1)] = 1;
      }
      if (query.count(make_pair(Y, 100005)) == 0) {
        query[make_pair(Y, 100005)] = 1;
      }
    }
  }
  for (__typeof((query).begin()) it = (query).begin(); it != (query).end();
       ++it) {
    pts.push_back((ST){1, (it->first).first, (it->first).second});
  }
  sort((pts).begin(), (pts).end());
  BIT bit(1 << 18);
  for (int i = (0); i < (int)(pts.size()); i++) {
    if (pts[i].type == 0) {
      bit.add(pts[i].r + 1, 1);
    } else {
      query[make_pair(pts[i].l, pts[i].r)] = bit.sum(pts[i].r + 1);
    }
  }
  for (int d = 1; d <= M; d++) {
    int ret = 0;
    int prev1 = query[make_pair(0, 100005)];
    for (int p = 1; d * (long long)p <= M; p++) {
      int X = d * (p - 1);
      int Y = d * p;
      int now = query[make_pair(Y, 100005)];
      ret +=
          now - query[make_pair(Y, Y - 1)] - prev1 + query[make_pair(X, Y - 1)];
      prev1 = now;
    }
    cout << ret << endl;
  }
  return 0;
}
