#include <bits/stdc++.h>
using namespace std;
set<int> sum[100005], add[100005], erase[100005];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < (n); i++) {
    int l, r;
    scanf("%d%d", &l, &r);
    add[l].insert(i);
    erase[r + 1].insert(i);
  }
  for (int i = 1; i <= m; i++) {
    sum[i] = sum[i - 1];
    for (int a : add[i]) sum[i].insert(a);
    for (int b : erase[i]) sum[i].erase(b);
  }
  for (int i = 1; i <= m; i++) {
    set<int> cnt;
    for (int j = 0; j <= m; j += i) {
      for (int a : sum[j]) cnt.insert(a);
    }
    printf("%d\n", cnt.size());
  }
}
