#include <bits/stdc++.h>
using namespace std;
const int MAX = 300010;
int N, M, v[MAX], l[MAX], r[MAX], dif[MAX], s[MAX];
int main(void) {
  while (~scanf("%d%d", &N, &M)) {
    for (int i = 0; i < N; i++) scanf("%d%d", &l[i], &r[i]);
    int d;
    memset(dif, 0, sizeof(dif));
    memset(s, 0, sizeof(s));
    memset(v, 0, sizeof(v));
    for (int i = 0; i < N; i++) dif[l[i]]++, dif[r[i] + 1]--;
    for (int i = 1; i <= M; i++) s[i] = s[i - 1] + dif[i];
    for (d = 1; d * d <= M; d++) {
      for (int i = 0; i < N; i++)
        if (r[i] / d > (l[i] - 1) / d) v[d]++;
    }
    for (; d <= M; d++) {
      for (int i = 1; i * d <= M; i++) v[d] += s[i * d];
    }
    for (int i = 1; i <= M; i++) printf("%d\n", v[i]);
  }
  return 0;
}
