#include <bits/stdc++.h>
using namespace std;
int dt[][2] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}, {0, 0}};
const int N = 3e5 + 5;
int n, m;
int tr[N];
struct node {
  int l, r, len;
  bool operator<(const node& b) const { return len < b.len; }
} s[N];
vector<int> v[N];
int lowbit(int x) { return x & -x; }
void add(int x, int c) {
  for (int i = x; i <= n; i += lowbit(i)) tr[i] += c;
}
int sum(int x) {
  int res = 0;
  for (int i = x; i; i -= lowbit(i)) res += tr[i];
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  cin >> n >> m;
  for (int i = (1); i <= (n); ++i) {
    int l, r;
    cin >> l >> r;
    s[i] = {l, r, r - l + 1};
  }
  sort(s + 1, s + 1 + n);
  for (int i = 1, j = 1; i <= m; ++i) {
    while (j <= n && s[j].len < i) {
      add(s[j].l, 1);
      add(s[j].r + 1, -1);
      ++j;
    }
    int ans = n - j + 1;
    for (int k = i; k <= m; k += i) ans += sum(k);
    cout << ans << endl;
  }
}
