#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 300000, MAX_M = 100000;
int N, M;
int l[MAX_N], r[MAX_N];
const int DATA_SIZE = 1 << 17;
int n;
long long data1[2 * DATA_SIZE - 1], data2[2 * DATA_SIZE - 1];
void init(int n_) {
  n = 1;
  while (n <= n_) n *= 2;
  return;
}
void update(int a, int b, long long x, int k, int l, int r) {
  if (r <= a || b <= l) return;
  if (a <= l && r <= b) {
    data1[k] += x;
  } else {
    data2[k] += (min(b, r) - max(a, l)) * x;
    int chl = 2 * k + 1, chr = 2 * k + 2;
    update(a, b, x, chl, l, (l + r) / 2);
    update(a, b, x, chr, (l + r) / 2, r);
  }
  return;
}
long long sum(int a, int b, int k, int l, int r) {
  if (r <= a || b <= l) return 0;
  if (a <= l && r <= b) {
    return data1[k] * (r - l) + data2[k];
  } else {
    long long res = (min(b, r) - max(a, l)) * data1[k];
    int chl = 2 * k + 1, chr = 2 * k + 2;
    res += sum(a, b, chl, l, (l + r) / 2);
    res += sum(a, b, chr, (l + r) / 2, r);
    return res;
  }
  return 0;
}
int ans[MAX_M + 1];
int main() {
  cin >> N >> M;
  for (int(i) = 0; (i) < (N); ++(i)) cin >> l[i] >> r[i];
  vector<pair<int, int> > v(N);
  for (int(i) = 0; (i) < (N); ++(i)) {
    v[i].first = r[i] - l[i] + 1;
    v[i].second = i;
  }
  sort((v).begin(), (v).end());
  init(M + 1);
  for (int d = 1; d <= M; ++d) {
    ans[d] = N - (lower_bound((v).begin(), (v).end(), pair<int, int>(d, 0)) -
                  v.begin());
    for (auto ite =
             lower_bound((v).begin(), (v).end(), pair<int, int>(d - 1, 0));
         ite->first < d; ++ite) {
      update(l[ite->second], r[ite->second] + 1, 1, 0, 0, n);
    }
    for (int k = 1; k * d <= M; ++k) {
      ans[d] += sum(k * d, k * d + 1, 0, 0, n);
    }
  }
  for (int d = 1; d <= M; ++d) printf("%d\n", ans[d]);
  return 0;
}
