#include <bits/stdc++.h>
using namespace std;
const int N = 3 * (1e5) + 10, M = 1e5 + 10;
struct Rec {
  int l, r;
  friend bool operator<(Rec x, Rec y) {
    return (x.r - x.l + 1) < (y.r - y.l + 1);
  }
} a[N];
int n, m, ans;
namespace BIT {
int c[M];
int mx;
void init(int _n) {
  mx = _n;
  memset(c, 0, sizeof(c));
}
void insert(int x, int delta) {
  for (; x <= mx; x += x & -x) c[x] += delta;
}
void update(int l, int r) {
  insert(l, 1);
  insert(r + 1, -1);
}
int query(int x) {
  int ret = 0;
  for (; x; x -= x & -x) ret += c[x];
  return ret;
}
}  // namespace BIT
void solve() {
  int now = 1;
  for (int i = 1; i <= m; ++i) {
    while (a[now].r - a[now].l + 1 <= i && now <= n) {
      BIT::update(a[now].l, a[now].r);
      ++now;
    }
    ans = n - now + 1;
    for (int j = i; j <= m; j += i) {
      ans += BIT::query(j);
    }
    printf("%d\n", ans);
  }
}
int main() {
  int l, r;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) scanf("%d%d", &a[i].l, &a[i].r);
  sort(a + 1, a + 1 + n);
  BIT::init(m + 1);
  solve();
}
