#include <bits/stdc++.h>
using namespace std;
int read() {
  char ch = getchar();
  int x = 0, op = 1;
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') op = -1;
  for (; isdigit(ch); ch = getchar()) x = (x << 1) + (x << 3) + ch - '0';
  return x * op;
}
int n, m;
long long ans[100005];
int main() {
  n = read(), m = read();
  for (int i = (1); i <= (n); i++) {
    int l = read() - 1, r = read(), last, j;
    for (j = 1; j <= l; j = last + 1) {
      last = min(l / (l / j), r / (r / j));
      if (r / j - l / j > 0) ans[j]++, ans[last + 1]--;
    }
    for (; j <= r; j = last + 1) {
      last = r / (r / j);
      if (r / j > 0) ans[j]++, ans[last + 1]--;
    }
  }
  for (int i = (1); i <= (m); i++)
    ans[i] += ans[i - 1], printf("%lld\n", ans[i]);
  return 0;
}
