#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 100;
int n, dp[maxn];
struct poly {
  long long x, h, i;
} p[maxn];
stack<poly> st;
bool cmp(poly a, poly b) {
  if (a.x < b.x) return true;
  return false;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> p[i].x >> p[i].h, p[i].i = i;
  }
  sort(p + 1, p + n + 1, cmp);
  dp[p[n].i] = 1;
  st.push(p[n]);
  for (int i = n - 1; i >= 1; i--) {
    long long cnt = 0;
    while (!st.empty()) {
      if (st.top().x > p[i].h + p[i].x - 1) {
        break;
      }
      cnt += dp[st.top().i];
      st.pop();
    }
    dp[p[i].i] = cnt + 1;
    st.push(p[i]);
  }
  for (int i = 1; i <= n; i++) cout << dp[i] << " ";
  return 0;
}
