#include <bits/stdc++.h>
using namespace std;
int X = 1000;
vector<int> d[100001];
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> ans(m + 1), s(m + 2);
  for (int i = 0; i < n; ++i) {
    int l, r;
    scanf("%d %d", &l, &r);
    for (int x = 1; x <= X; ++x) {
      if ((l + x - 1) / x <= r / x) ans[x]++;
    }
    s[l]++;
    s[r + 1]--;
  }
  for (int i = 0; i < m; ++i) s[i + 1] += s[i];
  for (int i = X + 1; i <= m; ++i) {
    for (int x = i; x <= m; x += i) d[x].push_back(i);
  }
  for (int x = X + 1; x <= m; ++x) {
    for (int i = 0; i < d[x].size(); ++i) {
      ans[d[x][i]] += s[x];
    }
  }
  for (int i = 1; i <= m; ++i) printf("%d\n", ans[i]);
  return 0;
}
