#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int lazy[maxn << 2];
void Push_down(int id) {
  lazy[id << 1] += lazy[id];
  lazy[id << 1 | 1] += lazy[id];
  lazy[id] = 0;
}
void up(int id, int l, int r, int tl, int tr) {
  if (l == tl && r == tr) {
    lazy[id]++;
    return;
  }
  if (lazy[id]) Push_down(id);
  int mid = (l + r) >> 1;
  if (tr <= mid)
    up(id << 1, l, mid, tl, tr);
  else if (tl > mid)
    up(id << 1 | 1, mid + 1, r, tl, tr);
  else {
    up(id << 1, l, mid, tl, mid);
    up(id << 1 | 1, mid + 1, r, mid + 1, tr);
  }
}
void Oput(int id, int l, int r) {
  if (l == r) {
    printf("%d\n", lazy[id]);
    return;
  }
  if (lazy[id]) Push_down(id);
  int mid = (l + r) >> 1;
  Oput(id << 1, l, mid);
  Oput(id << 1 | 1, mid + 1, r);
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  memset(lazy, 0, sizeof(lazy));
  for (int i = 1; i <= n; i++) {
    int l, r;
    scanf("%d%d", &l, &r);
    l--;
    for (int j = 1, k; j <= l; j = k + 1) {
      k = min(l / (l / j), r / (r / j));
      if (l / j != r / j) {
        up(1, 1, m, j, k);
      }
    }
    up(1, 1, m, l + 1, r);
  }
  Oput(1, 1, m);
  return 0;
}
