#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
struct node {
  int x, h;
  int num;
  int ans;
};
node a[maxn];
int ans[maxn];
stack<int> s;
int n;
void init() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    a[i].num = i;
    cin >> a[i].x >> a[i].h;
  }
}
bool cmp1(const node &a, const node &b) { return a.x < b.x; }
bool cmp2(const node &a, const node &b) { return a.num < b.num; }
void solve() {
  s.push(n);
  a[n].ans = 1;
  for (int i = n - 1; i >= 1; i--) {
    int j = i;
    while (!s.empty() && a[i].x + a[i].h > a[s.top()].x) {
      j = s.top();
      s.pop();
    }
    s.push(i);
    if (j == i)
      a[i].ans = 1;
    else
      a[i].ans = j - i + a[j].ans;
  }
  sort(a + 1, a + 1 + n, cmp2);
  for (int i = 1; i < n; i++) cout << a[i].ans << ' ';
  cout << a[n].ans << endl;
}
int main() {
  init();
  sort(a + 1, a + 1 + n, cmp1);
  solve();
  return 0;
}
