#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  int mins[300001];
  int maxes[300001];
  scanf("%d %d", &N, &M);
  for (int i = 0; i < N; i++) {
    scanf("%d %d", mins + i, maxes + i);
  }
  for (int i = 1; i <= M; i++) {
    int result = 0;
    for (int j = 0; j < N; j++) {
      if (mins[j] % i == 0 || mins[j] / i != maxes[j] / i) {
        result++;
      }
    }
    printf("%d\n", result);
  }
  return 0;
}
