#include <bits/stdc++.h>
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int s[n][2];
  for (int i = 0; i < n; i++) scanf("%d%d", &s[i][0], &s[i][1]);
  for (int i = 1; i <= m; i++) {
    int count = 0;
    for (int j = 0; j < n; j++) {
      if (s[j][1] >= i && s[j][0] <= s[j][1] - (s[j][1] % i)) {
        count++;
      }
    }
    printf("%d\n", count);
  }
  return 0;
}
