#include <bits/stdc++.h>
using namespace std;
int n, m;
int l[300100], r[300100], t[300100];
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> l[i] >> r[i];
  }
  for (int i = 1; i <= m; i++) {
    int ans = 0;
    for (int j = 1; j <= n; j++) {
      if ((l[j] % i) > (r[j] % i) || ((r[j] - l[j] + 1) >= i) ||
          (l[j] % i == 0))
        ans++;
    }
    cout << ans << endl;
  }
  return 0;
}
