#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, M;
  scanf("%lld %lld", &N, &M);
  vector<long long> l(N, -1), r(N, -1);
  for (long long i = 0; i < N; i++) {
    scanf("%lld %lld", &l[i], &r[i]);
  }
  for (long long i = 1; i <= M; i++) {
    long long ans = 0;
    for (long long j = 0; j < N; j++) {
      if (l[j] % i == 0 || (l[j] / i + 1) * i <= r[j]) ans++;
    }
    printf("%lld\n", ans);
  }
}
