#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> a[100005];
int bit[100005];
void add(int x, int d) {
  for (; x <= 100000; x += (x & -x)) {
    bit[x] += d;
  }
}
int sum(int x) {
  if (x == 0) return 0;
  int s = 0;
  for (; x >= 1; x -= (x & -x)) {
    s += bit[x];
  }
  return s;
}
int main() {
  int n, m, l, r;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &l, &r);
    a[r - l + 1].push_back({l, r});
  }
  for (int i = 1; i <= m; i++) {
    int ans = n;
    for (int j = i; j <= m; j += i) {
      ans += sum(j);
    }
    for (auto p : a[i]) {
      add(p.first, 1);
      add(p.second + 1, -1);
      n--;
    }
    printf("%d\n", ans);
  }
  return 0;
}
