#include <bits/stdc++.h>
using namespace std;
int n, m, cnt;
struct sell {
  int l, r;
} a[100005];
struct Query {
  int l, r, d;
} b[2000005];
int f[100005], g[100005], ans[100005];
int read() {
  int x = 0;
  char ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) x = (x << 3) + (x << 1) + (ch ^ 48), ch = getchar();
  return x;
}
void print(int x) {
  if (x >= 10) print(x / 10);
  putchar(x % 10 + '0');
}
int cmp(Query u, Query v) { return u.l > v.l; }
int cmp1(sell u, sell v) { return u.l > v.l; }
void updata(int x) {
  for (int i = x; i <= m; i += i & -i) f[i]++;
}
void updata1(int x) {
  for (int i = x; i <= m; i += i & -i) g[i]++;
}
int query(int x) {
  int res = 0;
  for (int i = x; i; i -= i & -i) res += f[i];
  return res;
}
int query1(int x) {
  int res = 0;
  for (int i = x; i; i -= i & -i) res += g[i];
  return res;
}
int main() {
  n = read(), m = read();
  for (int i = 1; i <= n; i++) a[i] = (sell){read(), read()};
  for (int i = 1; i <= m; i++) {
    for (int j = i; j <= m; j += i) b[++cnt] = (Query){j - i, j, i};
  }
  sort(b + 1, b + cnt + 1, cmp);
  sort(a + 1, a + n + 1, cmp1);
  for (int i = 1; i <= n; i++) updata(a[i].l);
  int L = 0;
  for (int i = 1; i <= cnt; i++) {
    while (L < n && a[L + 1].l > b[i].l) L++, updata1(a[L].r);
    ans[b[i].d] += L - query1(b[i].r - 1) - (n - query(b[i].r));
  }
  for (int i = 1; i <= m; i++) print(ans[i]), puts("");
  return 0;
}
