#include <bits/stdc++.h>
using namespace std;
int N, M;
int l[300001];
int r[300001];
int main() {
  scanf("%d%d", &N, &M);
  for (int i = 0; i < N; ++i) scanf("%d%d", l + i, r + i);
  printf("%d\n", N);
  for (int step = 2; step <= M; ++step) {
    int cnt = 0;
    for (int i = 0; i < N; ++i) {
      if (r[i] - l[i] + 1 >= step) {
        cnt++;
      } else if (l[i] % step == 0 || l[i] % step + (r[i] - l[i]) >= step) {
        cnt++;
      }
    }
    printf("%d\n", cnt);
  }
  return 0;
}
