#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1000000000;
const ll LINF = 1001002003004005006ll;
int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return true;
  }
  return false;
}
struct IOSetup {
  IOSetup() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout << fixed << setprecision(12);
  }
} iosetup;
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
  os << p.first << " " << p.second;
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  for (int i = 0; i < (int)v.size(); i++)
    os << v[i] << (i + 1 == (int)v.size() ? "" : " ");
  return os;
}
template <typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &p) {
  is >> p.first >> p.second;
  return is;
}
template <typename T>
istream &operator>>(istream &is, vector<T> &v) {
  for (T &x : v) is >> x;
  return is;
}
const int l = 100010;
signed main() {
  int n, m;
  cin >> n >> m;
  vector<vector<int>> imos_in(m + 2), imos_out(m + 2);
  for (int i = 0; i < (n); i++) {
    int l, r;
    cin >> l >> r;
    imos_out[r + 1].push_back(i);
    imos_in[l].push_back(i);
  }
  vector<bitset<l>> v(m + 1);
  {
    bitset<l> x;
    for (int i = 0; i < (m + 1); i++) {
      for (auto u : imos_in[i]) x.set(u);
      for (auto u : imos_out[i]) x.reset(u);
      v[i] = x;
    }
  }
  for (int i = 1; i <= m; i++) {
    bitset<l> x;
    for (int j = 0; j <= m; j += i) {
      x |= v[j];
    }
    cout << x.count() << endl;
  }
  return 0;
}
