#include <bits/stdc++.h>
using namespace std;
int x, y, n, ans[100010], add[100010];
vector<pair<pair<int, int>, int> > a;
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> x >> y;
    a.push_back(make_pair(make_pair(x, y), i));
  }
  sort(a.rbegin(), a.rend());
  for (int i = 0; i < n; ++i) {
    ans[i] = 1;
    for (int j = i - 1; j >= 0; --j)
      if (a[i].first.first + a[i].first.second - 1 >= a[j].first.first)
        ans[i] += ans[j], j -= ans[j] - 1;
      else if (a[i].first.first + a[i].first.second - 1 < a[j].first.first)
        break;
  }
  for (int i = 0; i < n; ++i) add[a[i].second] = ans[i];
  for (int i = 0; i < n; ++i) cout << add[i] << ' ';
  return 0;
}
