#include <bits/stdc++.h>
#pragma optimization_level 3
using namespace std;
int N, M;
int L[300000], R[300000];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> N >> M;
  for (int i = 0; i < N; i++) cin >> L[i] >> R[i];
  cout << N << "\n";
  for (int p = 2; p <= M; p++) {
    int c = 0;
    for (int i = 0; i < N; i++) {
      if (((L[i] + p - 1) / p) * p <= R[i]) c++;
    }
    cout << c << "\n";
  }
  return 0;
}
