#include <bits/stdc++.h>
using namespace std;
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
  std::fill((T *)array, (T *)(array + N), val);
}
pair<int, int> Dir[] = {{1, 0}, {0, 1}};
struct segtree {
 public:
  const int SIZE = 1 << 18;
  vector<long long> seg, lazy;
  segtree() : seg(SIZE * 2), lazy(SIZE * 2) {}
  void lazy_evaluate(int k, int l, int r) {
    if (lazy[k] != 0) {
      seg[k] += lazy[k];
      if (r - l > 1) {
        lazy[k * 2 + 1] += lazy[k];
        lazy[k * 2 + 2] += lazy[k];
      }
      lazy[k] = 0;
    }
  }
  void update(int a, int b, int k, int l, int r, int x) {
    lazy_evaluate(k, l, r);
    if (r <= a || b <= l) return;
    if (a <= l && r <= b) {
      lazy[k] += x;
      lazy_evaluate(k, l, r);
    } else {
      update(a, b, k * 2 + 1, l, (l + r) / 2, x);
      update(a, b, k * 2 + 2, (l + r) / 2, r, x);
      seg[k] = seg[k * 2 + 1] + seg[k * 2 + 2];
    }
  }
  long long query(int a, int b, int k, int l, int r) {
    lazy_evaluate(k, l, r);
    if (r <= a || b <= l) return 0;
    if (a <= l && r <= b) return seg[k];
    long long x = query(a, b, k * 2 + 1, l, (l + r) / 2);
    long long y = query(a, b, k * 2 + 2, (l + r) / 2, r);
    return x + y;
  }
  void update(int a, int b, int x) { update(a, b, 0, 0, SIZE, x); }
  long long query(int a, int b) { return query(a, b, 0, 0, SIZE); }
};
signed main() {
  int n, m;
  scanf("%d %d", &n, &m);
  vector<int> hc(112345);
  vector<pair<int, int> > ha(n);
  vector<int> rui(m + 2);
  for (int i = (0); (n) > i; i++) {
    int l, r;
    scanf("%d %d", &l, &r);
    rui[l] += 1;
    rui[r + 1] -= 1;
  }
  for (int i = (0); (m) > i; i++) {
    rui[i + 1] += rui[i];
  }
  printf("%d\n", m);
  for (int i = (2); (m + 1) > i; i++) {
    int ans = 0;
    for (int j = i; m >= j; j *= i) {
      ans += rui[j];
    }
    printf("%d\n", ans);
  }
  return 0;
}
