#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int dp[N], ans[N], tree[(1 << 18) + 5];
struct domino {
  int p;
  long long x, h;
} v[N];
bool cmp(domino a, domino b) { return a.x < b.x; }
void update(int node, int l, int r, int p) {
  if (l == r)
    tree[node] = p;
  else {
    int m = (l + r) / 2;
    if (p <= m)
      update(node << 1, l, m, p);
    else
      update(node << 1 | 1, m + 1, r, p);
    if (dp[tree[node << 1]] + tree[node << 1] <=
        dp[tree[node << 1 | 1]] + tree[node << 1 | 1])
      tree[node] = tree[node << 1 | 1];
    else
      tree[node] = tree[node << 1];
  }
}
int getMax(int node, int l, int r, int x, int y) {
  if (l > r || y < l || x > r) return 0;
  if (x <= l && r <= y) return tree[node];
  int m = (l + r) / 2, b1 = 0, b2 = 0;
  if (x <= m) b1 = getMax(node << 1, l, m, x, y);
  if (y > m) b2 = getMax(node << 1 | 1, m + 1, r, x, y);
  if (dp[b2] + b2 >= dp[b1] + b1)
    return b2;
  else
    return b1;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> v[i].x >> v[i].h;
    v[i].p = i;
  }
  sort(v + 1, v + n + 1, cmp);
  ans[v[n].p] = 1;
  dp[n] = 1;
  update(1, 1, n, n);
  for (int i = n - 1; i >= 1; i--) {
    int st = i + 1, dr = n, pos = i;
    dp[i] = 1;
    update(1, 1, n, i);
    while (st <= dr) {
      int mj = (st + dr) / 2;
      if (v[i].x + v[i].h > v[mj].x) {
        pos = mj;
        st = mj + 1;
      } else
        dr = mj - 1;
    }
    int best = getMax(1, 1, n, i, pos);
    dp[i] = max(dp[i], best - i + dp[best]);
    ans[v[i].p] = dp[i];
    update(1, 1, n, i);
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
