#include <bits/stdc++.h>
using namespace std;
int n, m, l[300000], r[300000];
int ans[100000];
int main(void) {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> l[i] >> r[i];
  }
  for (int d = 1; d <= m; d++) {
    for (int i = 0; i < n; i++) {
      if (l[i] % d == 0) {
        ans[d]++;
      } else if ((r[i] / d - l[i] / d) > 0) {
        ans[d]++;
      }
    }
    cout << ans[d] << endl;
  }
}
