#include <bits/stdc++.h>
using namespace std;
const int oo = (int)1e9;
const double PI = 2 * acos(0.0);
const double eps = 1e-9;
pair<long long, pair<long long, long long> > arr[100010];
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  map<int, int> dic;
  cin >> n;
  for (int i = 0; i < (int)(n); ++i) {
    cin >> arr[i].first >> arr[i].second.first;
    dic[arr[i].first] = i;
    arr[i].second.second = 0;
  }
  sort(arr, arr + n);
  for (int i = n - 1; i >= 0; --i) {
    int pos = i + 1;
    arr[i].second.second = 1;
    while (pos < n && arr[i].first + arr[i].second.first > arr[pos].first) {
      arr[i].second.second += arr[pos].second.second;
      pos += arr[pos].second.second;
    }
  }
  int ans[100010];
  for (int i = 0; i < (int)(n); ++i)
    ans[dic[arr[i].first]] = arr[i].second.second;
  for (int i = 0; i < (int)(n); ++i)
    if (i == 0)
      cout << ans[i];
    else
      cout << " " << ans[i];
  return 0;
}
