#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, val, seg[N << 2], lazy[N << 2], a[N], h[N], till[N], num[N], ans[N],
    dp[N];
void compress() {
  vector<int> vec;
  for (int i = 0; i < n; i++) vec.push_back(a[i]);
  sort(vec.begin(), vec.end());
  for (int i = 0; i < n; i++) {
    till[i] =
        upper_bound(vec.begin(), vec.end(), a[i] + h[i] - 1) - vec.begin();
    a[i] = lower_bound(vec.begin(), vec.end(), a[i]) - vec.begin();
  }
  return;
}
void relax(int id) {
  int lc = id * 2, rc = lc + 1;
  seg[lc] += lazy[id], lazy[lc] += lazy[id];
  seg[rc] += lazy[id], lazy[rc] += lazy[id];
  lazy[id] = 0;
  return;
}
void add(int l, int r, int id = 1, int s = 0, int e = n) {
  if (r <= s || e <= l) return;
  if (l <= s && e <= r) {
    lazy[id] += val;
    seg[id] += val;
    return;
  }
  relax(id);
  int mid = (s + e) / 2, lc = id * 2, rc = lc + 1;
  add(l, r, lc, s, mid);
  add(l, r, rc, mid, e);
  seg[id] = max(seg[lc], seg[rc]);
  return;
}
int get(int l, int r, int id = 1, int s = 0, int e = n) {
  if (r <= s || e <= l) return 0;
  if (l <= s && e <= r) return seg[id];
  relax(id);
  int mid = (s + e) / 2, lc = id * 2, rc = lc + 1;
  return max(get(l, r, lc, s, mid), get(l, r, rc, mid, e));
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n;
  iota(num, num + n, 0);
  for (int i = 0; i < n; i++) cin >> a[i] >> h[i];
  compress();
  sort(num, num + n, [](int x, int y) { return a[x] < a[y]; });
  dp[num[n - 1]] = 1;
  for (int i = n - 2; i >= 0; i--) {
    val = 1, add(i + 1, n);
    int mx = get(i + 1, till[num[i]]);
    dp[num[i]] = mx + 1;
    val = mx, add(i, i + 1);
  }
  for (int i = 0; i < n; i++) cout << dp[i] << " ";
  return 0;
}
