#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
int main() {
  int n;
  cin >> n;
  vector<vector<int> > a(n + 1, vector<int>(3));
  vector<int> ans(n + 1, 1);
  for (int i = 1; i <= n; i++) {
    cin >> a[i][0] >> a[i][1];
    a[i][2] = i;
  }
  sort(a.begin() + 1, a.end());
  stack<pair<int, int> > S;
  S.push({inf, 0});
  for (int i = n; i > 0; i--) {
    int cnt = 0;
    while (a[i][0] + a[i][1] > S.top().first) {
      cnt = cnt + 1 + S.top().second;
      S.pop();
    }
    ans[a[i][2]] = cnt + 1;
    S.push({a[i][0], cnt});
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
}
