#include <bits/stdc++.h>
using namespace std;
int cnt[300005], l[300005], r[300005];
int main() {
  ios::sync_with_stdio(false);
  ;
  cin.tie(0);
  ;
  int i, j, n, m, x, y, z, val, l1, r1, l2, r2;
  cin >> n >> m;
  for (i = 1; i <= n; i++) cin >> l[i] >> r[i];
  for (i = 1; i <= n; i++) {
    j = 1;
    while (j * j <= r[i]) {
      val = j;
      y = r[i] / val;
      x = 1 + (r[i] / (val + 1));
      y = min(y, m);
      if (x > y) continue;
      if (l[i] % val)
        z = l[i] / val + 1;
      else
        z = l[i] / val;
      z = max(z, x);
      l1 = 100000000;
      r1 = -100000000;
      l2 = 100000000;
      r2 = -100000000;
      if (z <= y) {
        l1 = z;
        r1 = y;
      }
      if ((r[i] / j) != j) {
        val = r[i] / j;
        y = r[i] / val;
        x = 1 + (r[i] / (val + 1));
        y = min(y, m);
        if (x > y) continue;
        if (l[i] % val)
          z = l[i] / val + 1;
        else
          z = l[i] / val;
        z = max(z, x);
        if (z <= y) {
          l2 = z;
          r2 = y;
        }
      }
      if (l2 > r1) {
        if (l1 <= r1) {
          cnt[l1]++;
          cnt[r1 + 1]--;
        }
        if (l2 <= r2) {
          cnt[l2]++;
          cnt[r2 + 1]--;
        }
      } else if (r2 < l1) {
        if (l1 <= r1) {
          cnt[l1]++;
          cnt[r1 + 1]--;
        }
        if (l2 <= r2) {
          cnt[l2]++;
          cnt[r2 + 1]--;
        }
      } else {
        x = min(l1, l2);
        y = max(r1, r2);
        if (x <= y) {
          cnt[x]++;
          cnt[y + 1]--;
        }
      }
      j++;
    }
  }
  for (i = 1; i <= m; i++) {
    cnt[i] += cnt[i - 1];
    cout << cnt[i] << " ";
  }
  return 0;
}
