#include <bits/stdc++.h>
using namespace std;
int nn_sum;
long long dat_sum1[(2 * (1 << 17)) - 1];
long long dat_sum2[(2 * (1 << 17)) - 1];
void init_sum(int n1) {
  nn_sum = 1;
  while (nn_sum < n1) nn_sum *= 2;
  for (int i = 0; i < 2 * nn_sum - 1; i++) {
    dat_sum1[i] = 0;
    dat_sum2[i] = 0;
  }
}
void add_sum(int a, int b, long long x, int k, int l, int r) {
  if (a <= l && r <= b) {
    dat_sum1[k] += x;
  } else if (l < b && a < r) {
    dat_sum2[k] += (min(b, r) - max(a, l)) * x;
    add_sum(a, b, x, k * 2 + 1, l, (l + r) / 2);
    add_sum(a, b, x, k * 2 + 2, (l + r) / 2, r);
  }
}
long long sum_sum(int a, int b, int k, int l, int r) {
  if (b <= l || r <= a)
    return 0LL;
  else if (a <= l && r <= b) {
    return (dat_sum1[k] * (r - l) + dat_sum2[k]);
  } else {
    long long ret;
    ret = (min(b, r) - max(a, l)) * dat_sum1[k];
    ret += sum_sum(a, b, k * 2 + 1, l, (l + r) / 2);
    ret += sum_sum(a, b, k * 2 + 2, (l + r) / 2, r);
    return ret;
  }
}
long long d[100100];
int main() {
  long long n, m;
  cin >> n >> m;
  vector<pair<long long, pair<long long, long long> > > v;
  for (long long i = (0); i < (n); ++i) {
    long long a, b;
    cin >> a >> b;
    v.push_back(make_pair(b - a + 1, make_pair(a, b)));
  }
  sort((v).begin(), (v).end());
  init_sum(m + 1);
  int index = 0;
  for (long long i = (1); i < (m + 1); ++i) {
    long long c = 0;
    while (index < n && v[index].first < i) {
      long long a = v[index].second.first;
      long long b = v[index].second.second;
      c++;
      add_sum(a, b + 1, 1, 0, 0, nn_sum);
      index++;
    }
    d[1] += c;
    d[i] -= c;
    long long e = 0;
    for (int j = i; j <= m; j += i) {
      e += sum_sum(j, j + 1, 0, 0, nn_sum);
    }
    d[i] += e;
    d[i + 1] -= e;
  }
  for (long long i = (0); i < (100005); ++i) {
    d[i + 1] += d[i];
  }
  for (long long i = (1); i < (m + 1); ++i) {
    cout << d[i] << endl;
  }
  return 0;
}
