#include <bits/stdc++.h>
using namespace std;
int val[300005];
int n, m;
void solve(int l, int r) {
  for (int i = 1, ne, lastl = 1e9; i <= l; i = ne + 1) {
    ne = min(l / (l / i), r / (r / i));
    if (l / i < lastl) {
      val[l / i]++, val[min(lastl, r / i + 1)]--;
      lastl = l / i;
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1, l, r; i <= n; i++) {
    scanf("%d%d", &l, &r);
    solve(l, r);
  }
  for (int i = 1; i <= m; i++) printf("%d\n", val[i] += val[i - 1]);
  return 0;
}
