#include <bits/stdc++.h>
#pragma comment(linker, "/stack:102400000,102400000")
using namespace std;
int f_abs(int x) { return x < 0 ? -x : x; }
int lowbit(int x) { return (x & -x); }
int f_max(int a, int b) { return a > b ? a : b; }
int f_min(int a, int b) { return a < b ? a : b; }
int gcd(int a, int b) {
  while (int t = a % b) a = b, b = t;
  return b;
}
bool isdig(char ch) { return ch >= '0' && ch <= '9'; }
bool isup(char ch) { return ch >= 'A' && ch <= 'Z'; }
bool islow(char ch) { return ch >= 'a' && ch <= 'z'; }
const double eps = 1e-9;
const int N = 100003;
struct node {
  int x, h, id;
} nd[N];
int n, ans[N], dp[N], tree[N << 2];
bool cmp(node A, node B) { return A.x < B.x; }
void init() {
  for (int i = 1; i <= n; ++i) dp[i] = i;
}
void get_data() {
  for (int i = 1; i <= n; ++i) {
    scanf("%d %d", &nd[i].x, &nd[i].h);
    nd[i].id = i;
  }
}
void BuildTree(int l, int r, int root) {
  if (l == r) {
    tree[root] = dp[l];
    return;
  }
  int mid = (l + r) >> 1;
  BuildTree(l, mid, root << 1);
  BuildTree(mid + 1, r, root << 1 | 1);
  tree[root] = f_max(tree[root << 1], tree[root << 1 | 1]);
}
int Query(int L, int R, int l, int r, int root) {
  if (L <= l && r <= R) return tree[root];
  int mid = (l + r) >> 1, t1 = 0, t2 = 0;
  if (L <= mid) t1 = Query(L, R, l, mid, root << 1);
  if (R > mid) t2 = Query(L, R, mid + 1, r, root << 1 | 1);
  return f_max(t1, t2);
}
void Update(int pos, int val, int l, int r, int root) {
  if (l == r) {
    tree[root] = val;
    return;
  }
  int mid = (l + r) >> 1;
  if (pos <= mid)
    Update(pos, val, l, mid, root << 1);
  else
    Update(pos, val, mid + 1, r, root << 1 | 1);
  tree[root] = f_max(tree[root << 1], tree[root << 1 | 1]);
}
int BinSearch(int val) {
  int mid, low = 1, high = n;
  if (val >= nd[n].x) return n;
  while (low < high) {
    mid = (low + high) >> 1;
    if (val < nd[mid].x)
      high = mid;
    else
      low = mid + 1;
  }
  return high - 1;
}
void solve() {
  int i, L, R;
  sort(nd + 1, nd + n + 1, cmp);
  BuildTree(1, n, 1);
  for (i = n; i >= 1; --i) {
    L = BinSearch(nd[i].x + 1);
    R = BinSearch(nd[i].x + nd[i].h - 1);
    dp[i] = Query(L, R, 1, n, 1);
    Update(i, dp[i], 1, n, 1);
    ans[nd[i].id] = dp[i] - i + 1;
  }
  for (i = 1; i <= n; ++i) {
    if (i != 1) printf(" ");
    printf("%d", ans[i]);
  }
  printf("\n");
}
int main() {
  while (~scanf("%d", &n)) {
    init();
    get_data();
    solve();
  }
  return 0;
}
