#include <bits/stdc++.h>
using namespace std;
long long n, m, kq, ct;
pair<long long, long long> a[300005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) cin >> a[i].first >> a[i].second;
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= m; ++i) {
    ct = 1;
    kq = 0;
    for (int j = i; j <= m; j += i) {
      while (ct <= n && a[ct].first <= j) {
        if (a[ct].second >= j) kq++;
        ct++;
      }
    }
    cout << kq << '\n';
  }
  return 0;
}
