#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int n, kq[300005];
struct domino {
  int x, h, id;
} a[300005];
bool cmp(domino u, domino v) { return u.x < v.x; }
void solve() {
  stack<pair<int, int> > st;
  int res;
  for (int i = n; i >= 1; i--) {
    res = 0;
    while (st.size() && a[i].x + a[i].h - 1 >= st.top().first) {
      res += st.top().second;
      st.pop();
    }
    kq[a[i].id] = res + 1;
    st.push(make_pair(a[i].x, res + 1));
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].x >> a[i].h;
    a[i].id = i;
  }
  sort(a + 1, a + n + 1, cmp);
  solve();
  for (int i = 1; i <= n; i++) cout << kq[i] << " ";
  return 0;
}
