#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
int N, M, l[300009], r[300009], c[300009];
vector<int> d[100009], lc[100009], rc[100009];
int main() {
  cin >> N >> M;
  for (int i = 0; i < N; i++) {
    scanf("%d%d", &l[i], &r[i]), l[i]--, c[i] = r[i] - l[i];
    lc[l[i]].push_back(i);
    rc[r[i]].push_back(i);
  }
  for (int i = 1; i <= M; i++) {
    int B = sqrt(i);
    int z = i / B;
    for (int j = 1; j < i / B; j++) {
      if (i / j != i / (j + 1)) {
        d[j].push_back(i);
      }
    }
    for (int j = B; j >= 1; j--) {
      d[i / j].push_back(i);
    }
  }
  int ret = N;
  for (int i = 1; i <= M; i++) {
    printf("%d\n", ret);
    for (int j : d[i]) {
      for (int k : rc[j]) {
        if (c[k] >= 1) ret--;
        c[k] -= r[k] / i - r[k] / (i + 1);
        if (c[k] >= 1) ret++;
      }
      for (int k : lc[j]) {
        if (c[k] >= 1) ret--;
        c[k] += l[k] / i - l[k] / (i + 1);
        if (c[k] >= 1) ret++;
      }
    }
  }
  return 0;
}
