#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
constexpr int INF = 2000000000;
constexpr int HINF = INF / 2;
constexpr double DINF = 100000000000000000.0;
constexpr long long LINF = 9223372036854775807;
constexpr long long HLINF = 4500000000000000000;
const double PI = acos(-1);
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
constexpr int MAX_N = 303030;
int bit[202020 + 1], n, m, l[303030], r[303030];
int sum(int i) {
  int s = 0;
  while (i > 0) {
    s += bit[i];
    i -= i & -i;
  }
  return s;
}
void add(int i, int x) {
  while (i <= 202020) {
    bit[i] += x;
    i += i & -i;
  }
}
int main() {
  cin >> n >> m;
  for (int i = (0); i < (n); i++) cin >> l[i] >> r[i];
  vector<pair<int, int>> v;
  for (int i = (0); i < (n); i++) v.emplace_back(make_pair(r[i] - l[i] + 1, i));
  sort((v).begin(), (v).end());
  int k = 0;
  for (int i = 1; i <= m; i++) {
    while (k < v.size() && v[k].first < i) {
      add(l[v[k].second] - 1, -1);
      add(r[v[k].second], 1);
      k++;
    }
    int ret = n - k;
    for (int j = 1; i * j <= m; j++) {
      ret += sum(i * j);
    }
    cout << ret << endl;
  }
}
