#include <bits/stdc++.h>
using namespace std;
long long int n, m;
long long int l[100010], r[100010];
vector<long long int> yakusu[100010];
long long int ans[100010];
vector<long long int> start[100010];
vector<long long int> ed[100010];
struct bit {
  long long int tree[100010];
  void add(long long int num, long long int val) {
    for (long long int i = num; i <= m; i += i & -i) tree[i] += val;
  }
  long long int sum(long long int s, long long int e) {
    long long int ret = 0;
    for (long long int i = e; i > 0; i -= i & -i) ret += tree[i];
    for (long long int i = s - 1; i > 0; i -= i & -i) ret -= tree[i];
    return ret;
  }
} tr;
signed main() {
  cin >> n >> m;
  for (long long int i = 1; i <= n; i++) cin >> l[i] >> r[i];
  for (long long int i = 1; i <= m; i++) {
    for (long long int j = i; j <= m; j += i) yakusu[j].push_back(i);
  }
  for (long long int i = 1; i <= n; i++) {
    start[l[i]].push_back(l[i]);
    ed[r[i]].push_back(l[i]);
  }
  for (long long int i = 1; i <= m; i++) {
    tr.add(i, start[i].size());
    for (auto pt : yakusu[i]) {
      ans[pt] += tr.sum(i - pt + 1, i);
    }
    for (auto pt : ed[i]) {
      tr.add(pt, -1);
    }
  }
  for (long long int i = 1; i <= m; i++) cout << ans[i] << endl;
  return 0;
}
