#include <bits/stdc++.h>
using namespace std;
const long long SIZE = 1e5 * 2 + 100, INF = 1e9 + 10, MOD = 1e9 + 7;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long n, m;
vector<long long> pref, inc, dc;
void input() {
  cin >> n >> m;
  pref.resize(n + 1);
  dc.resize(n + 1);
  inc.resize(n + 1);
  for (int i = 0; i < n; i++) {
    long long l, r;
    cin >> l >> r;
    l--;
    r--;
    pref[l]++;
    dc[l]++;
    inc[r + 1]++;
    pref[r + 1]--;
  }
}
void sol() {
  for (int i = 1; i <= n; i++) {
    pref[i] += pref[i - 1];
    inc[i] += inc[i - 1];
    dc[i] += dc[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    long long curS = 0, dis = 0, ans = 0;
    for (int j = 0; j <= n; j += i) {
      curS = pref[j];
      dis += inc[j];
      ans += curS + dis;
      dis -= dc[j];
    }
    cout << ans << "\n";
  }
}
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  ;
  long long t = 1;
  while (t--) {
    input();
    sol();
  }
  return 0;
}
