#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int i, j, k;
  int n, m;
  cin >> n >> m;
  pair<int, int> p[300000];
  for (i = 0; i < n; i++) cin >> p[i].first >> p[i].second;
  for (i = 1; i <= m; i++) {
    int ans = 0;
    for (j = 0; j < n; j++)
      if (p[j].first % i == 0 || p[j].second % i == 0 ||
          p[j].first / i != p[j].second / i)
        ans++;
    cout << ans << endl;
  }
}
