#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  vector<pair<int, int>> v(n);
  for (int i = 0; i < n; i++) {
    int l, r;
    scanf("%d%d", &l, &r);
    v[i] = make_pair(l, r);
  }
  for (int d = 1; d <= m; d++) {
    int sum = 0;
    for (int i = 0; i < n; i++) {
      int c = (v[i].first + d - 1) / d * d;
      if (c <= v[i].second) {
        sum++;
      }
    }
    printf("%d\n", sum);
  }
  return 0;
}
