#include <bits/stdc++.h>
using namespace std;
void Main() {
  long long N, M;
  cin >> N >> M;
  vector<long long> l(N), r(N);
  vector<bitset<300000>> station(M + 10, 0);
  for (long long i = (0); i < (N); i++) {
    cin >> l[i] >> r[i];
    bitset<300000> bt(1);
    bt << i;
    station[l[i]] ^= bt;
    station[r[i] + 1] ^= bt;
  }
  for (long long i = (1); i < (M + 1); i++) {
    station[i] ^= station[i - 1];
  }
  for (long long i = (1); i < (M + 1); i++) {
    bitset<300000> bt(0);
    for (long long j = 0; j < M + 1; j += i) {
      bt |= station[j];
    }
    cout << bt.count() << endl;
  }
}
int main() {
  Main();
  return 0;
}
