#include <bits/stdc++.h>
using namespace std;
struct BIT {
  int N;
  int bit[30010];
  void init(int n) {
    N = n;
    for (int i = 0; i <= n; ++i) bit[i] = 0;
  }
  void add(int a, int x) {
    for (int i = a; i <= N; i += i & -i) bit[i] += x;
  }
  int sum(int a) {
    int s = 0;
    for (int i = a; i > 0; i -= i & -i) s += bit[i];
    return s;
  }
};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N, M;
  cin >> N >> M;
  vector<int> w[M + 2];
  vector<pair<int, int>> lr(N);
  BIT bit;
  bit.init(M + 2);
  for (int(i) = (0); (i) < (int)(N); ++(i)) {
    cin >> lr[i].first >> lr[i].second;
    w[lr[i].second - lr[i].first + 1].push_back(i);
  }
  int cnt = 0;
  for (int d = 1; d <= M; ++d) {
    for (int i : w[d]) {
      cnt++;
      bit.add(lr[i].first, 1);
      bit.add(lr[i].second + 1, -1);
    }
    int ans = N - cnt;
    for (int m = d; m <= M; m += d) {
      ans += bit.sum(m);
    }
    cout << ans << endl;
  }
}
