#include <bits/stdc++.h>
int n, m;
int l[3000001];
int r[3000001];
int main(int argc, const char* argv[]) {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", &l[i], &r[i]);
  }
  for (int d = 1; d <= m; d++) {
    int ans = 0;
    for (int i = 1; i <= n; i++) {
      ans += (((int)r[i] / d) - ((int)(l[i] - 1) / d) > 0);
    }
    printf("%d\n", ans);
  }
  return 0;
}
