#include <bits/stdc++.h>
using namespace std;
int t[201000], n, m, ans[201000];
vector<int> fac[201000], s[201000];
void inc(int x) {
  for (++x; x; x -= x & -x) ++t[x];
}
int sum(int x) {
  int s = 0;
  for (++x; x <= n + 10; x += x & -x) s += t[x];
  return s;
}
int main() {
  scanf("%d%d", &m, &n);
  for (int i = 1; i <= m; ++i) {
    int l, r;
    scanf("%d%d", &l, &r);
    s[r + 1].push_back(l - 1);
  }
  for (int i = 1; i <= n + 1; ++i)
    for (int j = i; j <= n + 1; j += i) fac[j].push_back(i);
  for (int i = 1; i <= n + 1; ++i) {
    for (int l : s[i]) inc(l);
    for (int d : fac[i]) ans[d] -= sum(i - d);
  }
  for (int i = 1; i <= n; ++i) printf("%d\n", ans[i] + m);
  return 0;
}
