#include <bits/stdc++.h>
using namespace std;
const int Maxn = 100000 + 10;
const int INF = 0x7f7f7f7f;
const double eps = 1e-8;
const double pi = 3.1415926535897932384626433832795;
struct Item {
  int x, h, idx;
  bool operator<(const Item &t) const { return x < t.x; }
};
Item it[Maxn];
int ans[Maxn];
int main() {
  int n;
  ios::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    it[i].idx = i;
    cin >> it[i].x >> it[i].h;
  }
  sort(it + 1, it + n + 1);
  for (int i = n; i >= 1; i--) {
    ans[it[i].idx] = 1;
    int j = i + 1;
    while (j <= n && it[j].x <= it[i].x + it[i].h - 1) {
      ans[it[i].idx] += ans[it[j].idx];
      j += ans[it[j].idx];
    }
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
