#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
struct Node {
  int l, r, len;
} a[100010 << 2];
int b[100010 << 2];
inline bool cmp(Node a, Node b) {
  if (a.l < b.l)
    return 1;
  else if (a.l == b.l)
    return a.r < b.r;
  return 0;
}
inline void calc(int l, int r, int len) {
  int p = 1, flag = 0, last = 100000;
  for (int i = 1; i <= 100000; i++) {
    int t = r / i;
    if (t == 0) break;
    if (t - len <= 1 && flag) break;
    if (t - len <= 1) {
      flag = 1, b[1]++;
      if (t < last)
        b[t + 1]--;
      else
        b[last]--;
    } else {
      b[t - len]++;
      if (t < last)
        b[t + 1]--;
      else
        b[last]--;
    }
    last = max(t - len, 1);
  }
}
int main() {
  int N = read(), M = read(), mx = 0;
  for (int i = 1; i <= N; i++) {
    a[i].l = read(), a[i].r = read(), a[i].len = a[i].r - a[i].l;
    mx = max(a[i].r, mx);
  }
  sort(a + 1, a + N + 1, cmp);
  for (int i = 1; i <= N; i++) {
    calc(a[i].l, a[i].r, a[i].len);
  }
  for (int i = 2; i <= mx; i++) {
    b[i] += b[i - 1];
  }
  for (int i = 1; i <= M; i++) printf("%d\n", b[i]);
  return 0;
}
