#include <bits/stdc++.h>
int main(void) {
  int n, m, r[131072] = {0}, i, j, lef, rig;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) {
    scanf("%d%d", &lef, &rig);
    for (j = 1; j <= m; j++) {
      if (lef % j == 0 || lef / j != rig / j) {
        r[j]++;
      }
    }
  }
  for (j = 1; j <= m; j++) {
    printf("%d\n", r[j]);
  }
  return 0;
}
