#include <bits/stdc++.h>
using namespace std;
int tree[400005], lazy[400005], b[100005];
void update(int node, int st, int ed, int l, int r, int val) {
  if (lazy[node] > 0) {
    tree[node] += lazy[node];
    if (st != ed) {
      lazy[2 * node] += lazy[node];
      lazy[2 * node + 1] += lazy[node];
    }
    lazy[node] = 0;
  }
  if (r < st || ed < l) return;
  if (l <= st && ed <= r) {
    tree[node] += val;
    if (st != ed) {
      lazy[2 * node] += val;
      lazy[2 * node + 1] += val;
    }
  } else {
    int mid = (st + ed) / 2;
    update(2 * node, st, mid, l, r, val);
    update(2 * node + 1, mid + 1, ed, l, r, val);
    tree[node] = max(tree[2 * node], tree[2 * node + 1]);
  }
}
int query(int node, int st, int ed, int l, int r) {
  if (lazy[node] > 0) {
    tree[node] += lazy[node];
    if (st != ed) {
      lazy[2 * node] += lazy[node];
      lazy[2 * node + 1] += lazy[node];
    }
    lazy[node] = 0;
  }
  if (r < st || ed < l) {
    return 0;
  } else if (l <= st && ed <= r) {
    return tree[node];
  } else {
    int mid = (st + ed) / 2;
    int val1 = query(2 * node, st, mid, l, r);
    int val2 = query(2 * node + 1, mid + 1, ed, l, r);
    int ret = max(val1, val2);
    return ret;
  }
}
int main() {
  int n, i;
  cin >> n;
  pair<pair<int, int>, int> a[n + 1];
  int dp[n + 1];
  for (i = 1; i <= n; ++i) {
    cin >> a[i].first.first >> a[i].first.second;
    b[i - 1] = a[i].first.first;
    a[i].second = i;
  }
  sort(a + 1, a + n + 1);
  sort(b, b + n);
  dp[a[n].second] = 1;
  update(1, 1, n, n, n, 1);
  for (i = n - 1; i >= 1; --i) {
    if (i + 2 <= n) update(1, 1, n, i + 2, n, 1);
    auto pos = lower_bound(b, b + n, a[i].first.first + a[i].first.second) - b;
    if (i + 1 <= pos)
      dp[a[i].second] = query(1, 1, n, i + 1, pos) + 1;
    else
      dp[a[i].second] = 1;
    update(1, 1, n, i, i, dp[a[i].second]);
  }
  for (i = 1; i <= n; ++i) cout << dp[i] << " ";
  return 0;
}
