#include <bits/stdc++.h>
using namespace std;
struct domino {
  int x, h, i, z;
  void inp(int _i) { scanf("%d%d", &x, &h), i = _i, z = 1; }
};
bool cmp_toado(domino p, domino q) { return (p.x < q.x); }
bool cmp_thutu(domino p, domino q) { return (p.i < q.i); }
int n;
domino a[100010];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) a[i].inp(i);
  sort(a + 1, a + n + 1, cmp_toado);
  for (int i = n - 1; i >= 1; i--) {
    int j = i + 1;
    while (j <= n && a[i].h + a[i].x > a[j].x) {
      a[i].z += a[j].z;
      j += a[j].z;
    }
  }
  sort(a + 1, a + n + 1, cmp_thutu);
  for (int i = 1; i <= n; i++) printf("%d ", a[i].z);
}
