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