#include <bits/stdc++.h>
using namespace std;
void solve(long long N, long long M, vector<long long> l, vector<long long> r) {
  vector<tuple<int, long long, long long> > prods;
  for (long long i = 0; i < N; i++) {
    prods.push_back(tuple<int, long long, long long>(r[i] - l[i], l[i], r[i]));
  }
  sort(prods.begin(), prods.end());
  int idx = 0;
  int p = N;
  for (long long d = 1; d <= M; d++) {
    long long ans = 0;
    while (get<0>(prods[idx]) < d) {
      if (idx == N) break;
      idx++;
      p--;
    }
    ans = p;
    for (long long i = 0; i < idx; i++) {
      long long j = d;
      while (j <= M) {
        if (get<1>(prods[i]) <= j && j <= get<2>(prods[i])) {
          ans++;
          break;
        }
        j += d;
      }
    }
    cout << ans << endl;
  }
}
int main() {
  long long M;
  long long N;
  scanf("%lld", &N);
  vector<long long> l(N - 1 + 1);
  vector<long long> r(N - 1 + 1);
  scanf("%lld", &M);
  for (int i = 0; i <= N - 1; i++) {
    scanf("%lld", &l[i]);
    scanf("%lld", &r[i]);
  }
  solve(N, M, l, r);
  return 0;
}
