#include <bits/stdc++.h>
using std::cin;
using std::cout;
const int maxn = 300300;
const int mod = 998244353;
inline long long pow(long long a, int b, int ans = 1) {
  for (; b; b >>= 1, a = a * a % mod)
    if (b & 1) ans = ans * a % mod;
  return ans;
}
inline long long inverse(int x) { return pow(x, mod - 2); }
int n, m;
int tag[maxn];
inline void add(int a, int b) {
  for (int i = 1; i <= a || i <= b;) {
    int la = i <= a ? a / (a / i) + 1 : 1e9;
    int lb = i <= b ? b / (b / i) + 1 : 1e9;
    int nxt = std::min(la, lb);
    if (a / i != b / i) ++tag[i], --tag[nxt];
    i = nxt;
  }
}
int main() {
  std::ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  for (int i = (1), iend = (n); i <= iend; ++i) {
    int l, r;
    cin >> l >> r;
    add(l - 1, r);
  }
  for (int i = (1), iend = (m); i <= iend; ++i) {
    cout << (tag[i] += tag[i - 1]) << '\n';
  }
}
