#include <bits/stdc++.h>
using namespace std;
const int SIZE = 3e5 + 5;
int n, m;
int l[SIZE], r[SIZE], bit[SIZE];
std::pair<int, int> p[SIZE];
inline int read() {
  char ch = getchar();
  int f = 1, x = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 1) + (x << 3) + ch - '0';
    ch = getchar();
  }
  return x * f;
}
inline int CMP(pair<int, int> a, pair<int, int> b) {
  return (a.second - a.first) > (b.second - a.first);
}
inline int lowbit(int x) { return x & (-x); }
inline int Ask(int i) {
  int s = 0;
  for (; i > 0; i -= lowbit(i)) s += bit[i];
  return s;
}
inline void Add(int i, int x) {
  for (; i <= n; i += lowbit(i)) bit[i] += x;
}
int main() {
  n = read(), m = read();
  for (int i = 1; i <= n; i++) p[i].first = read(), p[i].second = read();
  std::sort(p + 1, p + n + 1, CMP);
  for (int i = 1; i <= n; i++) l[i] = p[i].first, r[i] = p[i].second;
  int cur = n;
  for (int d = 1; d <= m; d++) {
    while (cur && r[cur] - l[cur] + 1 < d) {
      Add(l[cur], 1);
      Add(r[cur] + 1, -1);
      cur--;
    }
    int ans = cur;
    for (int i = 0; i <= m; i += d) ans += Ask(i);
    printf("%d\n", ans);
  }
  return 0;
}
