#include <bits/stdc++.h>
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  std::vector<int> souvenir(m + 2);
  for (int i = 0; i < n; i++) {
    int l, r;
    scanf("%d%d", &l, &r);
    int min_r{r - l + 1};
    int pre_l{5000000}, pre_r{5000000};
    for (int i = 1; pre_l > min_r + 1; i++) {
      int tmp_l{(l + i - 1) / i}, tmp_r{r / i};
      if (tmp_r < tmp_l || pre_l == tmp_l) {
        for (int j = pre_l - 1; pre_l > min_r + 1; j--) {
          if ((l + j - 1) / j <= r / j) {
            souvenir[j]++;
            souvenir[j + 1]--;
            pre_l = pre_r = j;
          }
        }
        break;
      }
      souvenir[tmp_l]++;
      if (tmp_r >= pre_l - 1) {
        souvenir[pre_l]--;
        pre_l = tmp_l;
      } else {
        souvenir[tmp_r + 1]--;
        pre_l = tmp_l;
        pre_r = tmp_r;
      }
    }
    if (pre_r <= min_r) {
      souvenir[pre_r + 1]++;
      souvenir[pre_l]--;
      souvenir[min_r + 1]--;
      souvenir[1]++;
    } else {
      souvenir[pre_l]--;
      souvenir[1]++;
    }
  }
  for (int i = 1; i <= m; i++) {
    souvenir[i] += souvenir[i - 1];
    printf("%d\n", souvenir[i]);
  }
  return 0;
}
