#include <bits/stdc++.h>
long int N = 0, M = 0;
int main(void) {
  scanf("%ld%ld", &N, &M);
  int gifsta[N][M + 1];
  int bought[N][M + 1];
  for (int i = 0; i < N; i++) {
    int a = 0, b = 0;
    scanf("%d %d", &a, &b);
    for (int j = 0; j < a; j++) {
      gifsta[i][j] = 0;
    }
    for (int j = a; j <= b; j++) {
      gifsta[i][j] = 1;
    }
    for (int j = b + 1; j <= M + 1; j++) {
      gifsta[i][j] = 0;
    }
  }
  for (int d = 1; d <= M; d++) {
    int ans = 0;
    for (int i = 0; i * d <= M + 1; i++) {
      for (int j = 0; j < N; j++) {
        if (gifsta[j][i * d] == 1) {
          bought[j][d] = 1;
        } else if (bought[j][d] != 1) {
          bought[j][d] = 0;
        }
      }
    }
    for (int j = 0; j < N; j++) {
      if (bought[j][d] == 1) {
        ans++;
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}
