#include <bits/stdc++.h>
long long int MOD = 998244353;
using namespace std;
string alphabet("abcdefghijklmnopqrstuvwxyz");
int main() {
  int n, m, count[310000] = {};
  cin >> n >> m;
  for (int t = 0; t < n; t++) {
    int l, r;
    cin >> l >> r;
    int pl = l, pr = r + 1;
    for (int i = 1; i * i <= r; i++) {
      l = max(i * i, l);
      if (pl < (r + i) / i) {
        pl = min((l + i - 1) / i, pl);
      } else {
        pl = max(i, pl);
        count[pl]++;
        count[pr]--;
        pl = (l + i - 1) / i;
        pr = (r + i) / i;
      }
      if (l / i != r / i && i < (l + i - 1) / i) {
        count[i]++;
        count[i + 1]--;
      }
      if (i == 1 && l == r && 1 < l) {
        count[1]++;
        count[2]--;
      }
    }
    count[pl]++;
    count[pr]--;
  }
  for (int i = 1; i <= m; ++i) {
    count[i] = count[i] + count[i - 1];
  }
  for (int i = 1; i <= m; ++i) {
    cout << count[i] << endl;
  }
  return 0;
}
