#include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 30;
const long long linf = 1LL << 62;
const int MAX = 510000;
long long dy[8] = {0, -1, 0, 1, 1, -1, 1, -1};
long long dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const double pi = acos(-1);
const double eps = 1e-7;
template <typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) {
  if (a > b) {
    a = b;
    return true;
  } else
    return false;
}
template <typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) {
  if (a < b) {
    a = b;
    return true;
  } else
    return false;
}
template <typename T>
inline void print(T &a) {
  for (int i = 0; i < (a.size()); i++) cout << a[i] << " ";
  cout << "\n";
}
template <typename T1, typename T2>
inline void print2(T1 a, T2 b) {
  cout << a << " " << b << "\n";
}
template <typename T1, typename T2, typename T3>
inline void print3(T1 a, T2 b, T3 c) {
  cout << a << " " << b << " " << c << "\n";
}
const long long mod = 1e9 + 7;
template <typename T>
struct BIT {
  vector<T> dat;
  long long sz;
  BIT(long long sz) : sz(sz) { dat.assign(++sz, 0); }
  T sum(long long k) {
    T ret = 0;
    for (++k; k > 0; k -= k & -k) ret += dat[k];
    return (ret);
  }
  void add(long long k, T x) {
    for (++k; k < dat.size(); k += k & -k) dat[k] += x;
  }
  long long get(T k) {
    if (k <= 0) return 0;
    long long ret = 0;
    int n = 1;
    while (n < sz) n *= 2;
    for (int i = n / 2; i > 0; i /= 2) {
      if (ret + i < sz && dat[ret + i] < k) {
        k -= dat[ret + i];
        ret += i;
      }
    }
    return ret;
  }
};
BIT<int> bit0(101010), bit1(101010);
int range_sum(int l, int r, int x) {
  bit0.add(l, -x * (l - 1));
  bit0.add(r + 1, x * r);
  bit1.add(l, x);
  bit1.add(r + 1, -x);
}
int query(int i) {
  if (i < 0) return 0;
  return bit0.sum(i) + bit1.sum(i) * i;
}
int main() {
  long long n, m;
  cin >> n >> m;
  vector<vector<pair<int, int>>> v(m);
  for (int i = 0; i < (n); i++) {
    int a, b;
    cin >> a >> b;
    v[b - a].emplace_back(a, b);
  }
  int now = 0;
  for (int i = (1); i < (m + 1); i++) {
    for (auto j : v[i - 1]) {
      now++;
      range_sum(j.first, j.second, 1);
    }
    int ans = now;
    for (int j = 0; j <= m; j += i) {
      ans -= query(j) - query(j - 1);
    }
    cout << n - ans << "\n";
  }
}
