#include <bits/stdc++.h>
using namespace std;
int ft[100005];
void update(int i, int v) {
  for (; i <= 100000; i += (i & -i)) ft[i] += v;
}
int query(int i) {
  int ans = 0;
  for (; i > 0; i -= (i & -i)) ans += ft[i];
  return ans;
}
int l[100005], r[100005];
vector<int> del[100005];
int main() {
  int n, m, sum = 0;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &l[i], &r[i]);
    del[r[i] - l[i] + 1].emplace_back(i);
    sum++;
  }
  for (int d = 1; d <= m; d++) {
    int ans = sum;
    for (int i = d; i <= m; i += d) {
      ans += query(i);
    }
    for (int j = 0; j < (int)(del[d]).size(); j++) {
      int idx = del[d][j];
      update(l[idx], 1);
      update(r[idx] + 1, -1);
      sum--;
    }
    printf("%d\n", ans);
  }
}
