#include <bits/stdc++.h>
using namespace std;
template <class T, class S>
bool chmax(T &a, const S &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T, class S>
bool chmin(T &a, const S &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
long long gcd(long long n, long long m) { return (m ? gcd(m, n % m) : n); }
long long lcm(long long n, long long m) { return n / gcd(n, m) * m; }
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  long long n, m;
  cin >> n >> m;
  vector<long long> l(n), r(n);
  for (long long i = 0; i < (n); i++) cin >> l[i] >> r[i];
  vector<bitset<100010>> a(m);
  for (long long i = 0; i < (n); i++) {
    for (long long j = l[i] - 1; j < r[i]; j++) {
      a[j][i] = 1;
    }
  }
  for (long long i = 1; i <= m; i++) {
    bitset<100010> ans;
    for (long long j = i - 1; j < m; j += i) {
      ans |= a[j];
    }
    cout << ans.count() << '\n';
  }
}
