#include <bits/stdc++.h>
using namespace std;
struct Domi {
  int x, h, id;
  int ans;
  void read(int i) {
    scanf("%d%d", &x, &h);
    id = i;
    ans = -1;
  }
  int getRightMost() const { return x + h - 1; }
  void show() { printf("(%d,%d)\n", x, h); }
} domi[100030];
bool cmpByX(const Domi &a, const Domi &b) { return a.x < b.x; }
bool cmpById(const Domi &a, const Domi &b) { return a.id < b.id; }
int dp[100030];
int n;
int dfs(int i) {
  if (i > n) return 0;
  if (dp[i] != -1) return dp[i];
  int ans = 1;
  int rm = domi[i].getRightMost();
  int now = i + 1;
  while (now < n && domi[now].x <= rm) {
    int tmp = dfs(now);
    if (tmp + now - i > ans) ans = tmp + now - i;
    now = i + ans;
  }
  return dp[i] = ans;
}
int main() {
  while (scanf("%d", &n) != EOF) {
    for (int i = 0; i < n; i++) {
      domi[i].read(i);
    }
    sort(domi, domi + n, cmpByX);
    memset(dp, -1, sizeof(dp));
    dp[n - 1] = 1;
    for (int i = n - 1; i >= 0; i--) {
      domi[i].ans = dfs(i);
    }
    sort(domi, domi + n, cmpById);
    for (int i = 0; i < n; i++) {
      if (i != 0) printf(" ");
      printf("%d", domi[i].ans);
    }
    puts("");
  }
  return 0;
}
