#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 7;
pair<int, int> rgs[maxn];
int ans[maxn];
int main() {
  int n, m;
  scanf("%d", &n);
  scanf("%d", &m);
  fill(ans, ans + maxn, 0);
  int head = 0;
  for (int i = 1; i <= n; i++) {
    int l, r;
    scanf("%d", &l);
    scanf("%d", &r);
    int k = 1;
    while (k <= r) {
      int rp = r / k;
      int kl = r / rp;
      int lp = (l + kl - 1) / kl;
      kl = r / lp;
      lp = (l + kl - 1) / kl;
      k = kl + 1;
      if (lp < 0) break;
      while (head > 0) {
        pair<int, int> q = rgs[head];
        if (q.first <= rp) {
          head--;
          rp = q.second;
        } else
          break;
      }
      head++;
      rgs[head] = make_pair(lp, rp);
    }
    while (head > 0) {
      pair<int, int> z = rgs[head];
      head--;
      ans[z.first]++;
      ans[z.second + 1]--;
    }
  }
  for (int i = 1; i <= m; i++) {
    ans[i] += ans[i - 1];
    printf("%d", ans[i]);
    printf("\n");
  }
}
