#include <bits/stdc++.h>
using namespace std;
const int Size = 1 << 16;
char buffer[Size], *head, *tail;
inline char Getchar() {
  if (head == tail) {
    int l = fread(buffer, 1, Size, stdin);
    tail = (head = buffer) + l;
  }
  if (head == tail) return -1;
  return *head++;
}
inline int read() {
  int x = 0, f = 1;
  char c = Getchar();
  for (; !isdigit(c); c = Getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = Getchar()) x = x * 10 + c - '0';
  return x * f;
}
const int maxn = 300010;
const int maxm = 100010;
struct Point {
  int tp, x, y;
  bool operator<(const Point& b) const {
    if (x != b.x) return x < b.x;
    if (y != b.y) return y < b.y;
    return tp < b.tp;
  }
} Q[maxm * 50];
int n, m, cnt, ans[maxn];
int sumv[2 * maxn];
void add(int x, int v) {
  for (; x <= 2 * n; x += x & -x) sumv[x] += v;
}
int query(int x) {
  int res = 0;
  for (; x; x -= x & -x) res += sumv[x];
  return res;
}
int main() {
  n = read();
  m = read();
  for (int i = (1), i_end_ = (n); i <= i_end_; i++) {
    int l = read(), r = read();
    Q[++cnt] = (Point){0, n - l + 1, r};
  }
  for (int i = (1), i_end_ = (m); i <= i_end_; i++) {
    for (int j = i;; j += i) {
      int p = j - i;
      if (p > n) break;
      Q[++cnt] = (Point){i, n - p, j - 1};
    }
  }
  sort(Q + 1, Q + cnt + 1);
  for (int i = (1), i_end_ = (cnt); i <= i_end_; i++) {
    if (!Q[i].tp)
      add(Q[i].y, 1);
    else
      ans[Q[i].tp] += query(Q[i].y);
  }
  for (int i = (1), i_end_ = (m); i <= i_end_; i++) printf("%d\n", n - ans[i]);
  return 0;
}
