#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long l[300010];
long long r[300010];
long long sum[300010];
long long ans[300010];
signed main() {
  cin >> n >> m;
  for (long long i = 0; i < n; i++) {
    cin >> l[i] >> r[i];
    long long b = r[i] - l[i] + 1;
    if (l[i] <= b) {
      sum[1]++;
      sum[r[i] + 1]--;
    } else {
      sum[l[i]]++;
      sum[r[i] + 1]--;
      sum[1]++;
      sum[b + 1]--;
      for (long long j = l[i]; j < r[i] + 1; j++) {
        for (long long k = 2;; k++) {
          if (j / k <= b) break;
          if (j % k == 0) ans[j / k]++;
        }
      }
    }
  }
  for (long long i = 1; i < 300010; i++) {
    sum[i] += sum[i - 1];
  }
  for (long long i = 1; i < m + 1; i++) {
    cout << ans[i] + sum[i] << endl;
  }
}
