#include <bits/stdc++.h>
using namespace std;
int a[100001] = {};
vector<int> v[100001];
int n, m;
int main() {
  cin >> n >> m;
  int l, r;
  for (int i = 1; i < n + 1; i++) {
    cin >> l >> r;
    a[l]++;
    a[r + 1]--;
    v[r].push_back(l);
  }
  for (int i = 1; i < m + 1; ++i) a[i] += a[i - 1];
  for (int i = 1; i < m + 1; ++i) {
    if (v[i].empty()) continue;
    for (int j = 1; j * j <= i + 1; ++j) {
      int k1 = i % j;
      int j2 = i / j;
      for (auto it : v[i]) {
        if (i - it >= k1) {
          if (j < it) a[j]++;
          if (j2 < it && (j2 > j)) a[j2]++;
        }
      }
    }
  }
  for (int i = 1; i < m + 1; ++i) cout << a[i] << endl;
  return 0;
}
