#include <bits/stdc++.h>
using namespace std;
int ans[100005], cf[100005], l[500005], r[500005];
const int bl = 2;
int main(int argc, char** argv) {
  int n, m;
  ios::sync_with_stdio(false);
  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++) ans += (l[j] - 1) / i != r[j] / i;
    cout << ans << endl;
  }
  return 0;
}
