#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
inline bool valid(int x, int w) { return 0 <= x && x < w; }
void iostream_init() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.setf(ios::fixed);
  cout.precision(12);
}
set<pair<int, int>> queries;
map<pair<int, int>, int> result;
struct BIT {
  vector<long long> sums;
  BIT(int n) : sums(n) {}
  void add(int at, long long by) {
    while (at < sums.size()) {
      sums[at] += by;
      at |= at + 1;
    }
  }
  long long get(int at) {
    long long res = 0;
    while (at >= 0) {
      res += sums[at];
      at = (at & (at + 1)) - 1;
    }
    return res;
  }
  int size() const { return sums.size(); }
  long long operator[](int idx) const { return sums[idx]; }
};
int main() {
  iostream_init();
  int N, M;
  while (cin >> N >> M) {
    result.clear();
    queries.clear();
    vector<pair<int, int>> ps(N);
    for (int i = 0; i < (int)(N); ++i) cin >> ps[i].first >> ps[i].second;
    sort(ps.begin(), ps.end());
    auto set = [&](int x1, int x2, int y1, int y2) {
      queries.insert(pair<int, int>(x2, y2));
      queries.insert(pair<int, int>(x1 - 1, y2));
      queries.insert(pair<int, int>(x2, y1 - 1));
      queries.insert(pair<int, int>(x1 - 1, y1 - 1));
    };
    auto get = [&](int x1, int x2, int y1, int y2) {
      return result[pair<int, int>(x2, y2)] -
             result[pair<int, int>(x1 - 1, y2)] -
             result[pair<int, int>(x2, y1 - 1)] +
             result[pair<int, int>(x1 - 1, y1 - 1)];
    };
    for (int d = 1; d <= M; d++) {
      for (int x = d; x <= M; x += d) {
        set(x - d + 1, x, x, M);
      }
    }
    vector<pair<int, int>> qs(queries.begin(), queries.end());
    int idx = 0;
    int qi = 0;
    BIT bit(M + 1);
    for (int x = -10; x <= M; x++) {
      while (idx < ps.size() && ps[idx].first == x) {
        bit.add(ps[idx].second, 1);
        idx++;
      }
      while (qi < qs.size() && qs[qi].first == x) {
        result[qs[qi]] = (int)bit.get(qs[qi].second);
        qi++;
      }
    }
    for (int d = 1; d <= M; d++) {
      int ans = 0;
      for (int x = d; x <= M; x += d) {
        int g = get(x - d + 1, x, x, M);
        ans += g;
      }
      cout << ans << endl;
    }
  }
  return 0;
}
