#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
struct node {
  int loc;
  int h;
  int p;
  int num;
} a[N];
int n;
int ans[N], last[N];
bool cmp(node a, node b) { return a.loc < b.loc; }
bool cmp1(node a, node b) { return a.p < b.p; }
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &a[i].loc, &a[i].h);
    a[i].loc += 1e8;
    a[i].p = i;
  }
  sort(a + 1, a + n + 1, cmp);
  a[n].num = 1;
  for (int i = n - 1; i > 0; i--) {
    int now = i + 1;
    a[i].num += 1;
    while (now && a[i].loc + a[i].h > a[now].loc) {
      a[i].num += a[now].num;
      now = last[now];
    }
    last[i] = now;
  }
  sort(a + 1, a + n + 1, cmp1);
  for (int i = 1; i <= n; i++) printf("%d ", a[i].num);
}
