#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000000 + 7;
const double esp = 1e-13;
const double pi = 3.141592653589;
struct node {
  int l, r, vt, k;
};
bool cmp(node a, node b) { return (a.l < b.l); }
int n, x, j, ans[100000 + 10];
node a[100000 + 10];
int main() {
  ({
    int neg = 0;
    n = 0;
    char ch;
    for (ch = getchar(); ch < '0' || ch > '9'; ch = getchar())
      if (ch == '-') neg = 1 - neg;
    n = ch - 48;
    for (ch = getchar(); ch >= '0' && ch <= '9'; ch = getchar())
      n = (n << 3) + (n << 1) + ch - 48;
    if (neg) n = -n;
  });
  for (int i = (1), _b = (n); i <= _b; i++) {
    ({
      int neg = 0;
      a[i].l = 0;
      char ch;
      for (ch = getchar(); ch < '0' || ch > '9'; ch = getchar())
        if (ch == '-') neg = 1 - neg;
      a[i].l = ch - 48;
      for (ch = getchar(); ch >= '0' && ch <= '9'; ch = getchar())
        a[i].l = (a[i].l << 3) + (a[i].l << 1) + ch - 48;
      if (neg) a[i].l = -a[i].l;
    });
    ({
      int neg = 0;
      x = 0;
      char ch;
      for (ch = getchar(); ch < '0' || ch > '9'; ch = getchar())
        if (ch == '-') neg = 1 - neg;
      x = ch - 48;
      for (ch = getchar(); ch >= '0' && ch <= '9'; ch = getchar())
        x = (x << 3) + (x << 1) + ch - 48;
      if (neg) x = -x;
    });
    a[i].r = a[i].l + x;
    a[i].vt = i;
  }
  sort(a + 1, a + n + 1, cmp);
  for (int i = (n), _b = (1); i >= _b; i--) {
    j = i + 1;
    while (j <= n && a[j].l < a[i].r) j += a[j].k;
    a[i].k = j - i;
    ans[a[i].vt] = j - i;
  }
  for (int i = (1), _b = (n); i <= _b; i++) printf("%d ", ans[i]);
}
