#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000 * 1000 * 1000 + 7;
const long long INF = 8 * 1000 * 1000 + 200;
const long long MAXN = 100 * 1000 + 1;
const long long MLOG = 18;
const long long NMAX = 20;
struct fen {
  long long fn[MAXN];
  void add(long long idx, long long val) {
    for (idx++; idx < MAXN; idx += idx & -idx) fn[idx] += val;
  }
  void addr(long long l, long long r, long long val = 1) {
    add(l, val);
    add(r + 1, -val);
  }
  long long ansq(long long idx) {
    long long ans = 0;
    for (idx++; idx > 0; idx -= idx & -idx) ans += fn[idx];
    return ans;
  }
} me;
signed main() {
  ios_base::sync_with_stdio(false);
  ;
  long long n, m;
  cin >> n >> m;
  long long seg[n][2];
  vector<pair<long long, long long>> vc[2 * MAXN];
  for (long long i = 0; i < n; i++) {
    cin >> seg[i][0] >> seg[i][1];
    vc[seg[i][1] - seg[i][0] + 1].push_back({seg[i][0], seg[i][1]});
  }
  long long x = 0;
  for (long long i = 1; i <= m; i++) {
    long long ans = 0;
    for (long long j = 0; j < (long long)(vc[i].size()); j++) {
      me.addr(vc[i][j].first, vc[i][j].second);
      x++;
    }
    for (long long j = i; j <= m; j += i) {
      ans += me.ansq(j);
    }
    cout << ans + n - x << endl;
  }
}
