#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
struct node {
  int x, y, p;
} a[maxn];
int n;
int f[maxn], ans[maxn];
bool cmp(node i, node j) { return i.x < j.x; }
int main() {
  int i, x, y;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d%d", &x, &y);
    a[i].x = x;
    a[i].y = x + y - 1;
    a[i].p = i;
  }
  sort(a + 1, a + n + 1, cmp);
  for (i = n; i >= 1; i--) {
    f[i] = 1;
    for (int j = i + 1; j <= n; j += f[j]) {
      if (a[i].y >= a[j].x)
        f[i] += f[j];
      else
        break;
    }
    ans[a[i].p] = f[i];
  }
  for (i = 1; i <= n; i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
