#include <bits/stdc++.h>
using namespace std;
const int N = 200003;
int n, m, cnt, f[N], kq[N];
pair<pair<int, int>, int> p[N * 17];
void ud(int i) {
  for (; i <= m; i += (i & -i)) f[i]++;
}
int tv(int i) {
  int res = 0;
  for (; i > 0; i -= (i & -i)) res += f[i];
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cnt++;
    cin >> p[cnt].second >> p[cnt].first.first;
    p[cnt].first.second = -1;
  }
  for (int i = 2; i <= m; i++)
    for (int j = i; j < m + i; j += i) {
      cnt++;
      p[cnt].first.first = j - 1;
      p[cnt].first.second = i;
      p[cnt].second = j - i + 1;
    }
  sort(p + 1, p + cnt + 1);
  for (int i = 1; i <= cnt; i++) {
    int cs = p[i].first.second;
    if (cs < 0)
      ud(p[i].second);
    else
      kq[cs] += tv(p[i].first.first) - tv(p[i].second - 1);
  }
  for (int i = 1; i <= m; i++) cout << n - kq[i] << "\n";
  return 0;
}
