#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
const long long mod = 1000000007;
struct Node {
  int l, r;
  bool operator<(const Node &a) const { return (r - l + 1) < (a.r - a.l + 1); }
} s[maxn + (maxn << 1)];
vector<int> g[maxn];
int c[maxn];
int n, m;
void add(int l, int r) {
  while (l <= m) {
    ++c[l];
    l += l & (-l);
  }
  while (r <= m) {
    --c[r];
    r += r & (-r);
  }
  return;
}
int query(int i) {
  int res = 0;
  while (i) {
    res += c[i];
    i -= i & (-i);
  }
  return res;
}
int main() {
  memset(c, 0, sizeof(c));
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; ++i) {
    g[i].clear();
  }
  for (int i = 1; i <= n; ++i) {
    scanf("%d%d", &s[i].l, &s[i].r);
    int len = s[i].r - s[i].l + 1;
    g[len].push_back(i);
  }
  sort(s + 1, s + 1 + n);
  for (int i = 1; i <= m; ++i) {
    int ans = 0;
    for (int j = 0; j < g[i].size(); ++j) {
      int &pos = g[i][j];
      add(s[pos].l, s[pos].r + 1);
    }
    n -= g[i].size();
    for (int j = i; j <= m; j += i) {
      ans += query(j);
    }
    printf("%d\n", ans + n);
  }
  return 0;
}
