#include <bits/stdc++.h>
using namespace std;
const int inf = 1e5 + 5;
int n;
int ans[inf];
int last[inf];
struct node {
  int x, h, q;
  bool operator<(const node &s) const { return s.x > x; }
} a[inf << 1];
inline int read() {
  int a = 0;
  int b = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') b = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    a = a * 10 + c - '0';
    c = getchar();
  }
  return a * b;
}
inline void run() {
  int x, y;
  n = read();
  for (int i = 1; i <= n; i++) {
    x = read();
    y = read();
    a[i].x = x;
    a[i].h = y;
    a[i].q = i;
  }
  sort(a + 1, a + 1 + n);
  for (int i = 1; i <= n; i++) {
    ans[i] = 1;
  }
  for (int i = n - 1; i > 0; i--) {
    int now = i + 1;
    while (now && ((a[i].x + a[i].h) > a[now].x)) {
      ans[a[i].q] += ans[a[now].q];
      now = last[now];
    }
    last[i] = now;
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  run();
  return 0;
}
