#include <bits/stdc++.h>
using namespace std;
int main() {
  long int N, M;
  long int l[300000], r[30000];
  int cnt[100000];
  cin >> N >> M;
  for (int i = 0; i < (N); i++) cin >> l[i] >> r[i];
  for (int j = 0; j < (M + 1); j++) cnt[j] = 0;
  for (int i = 0; i < (N); i++) {
    for (int j = 0; j < (M); j++) {
      if (l[i] % (j + 1) == 0 || l[i] / (j + 1) * (j + 1) + (j + 1) <= r[i])
        cnt[j]++;
    }
  }
  for (int j = 0; j < (M); j++) cout << cnt[j] << endl;
  return 0;
}
