#include <bits/stdc++.h>
using namespace std;
template <class T>
T gcd(T a, T b) {
  T r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class T>
int getbit(T s, int i) {
  return (s >> i) & 1;
}
template <class T>
T onbit(T s, int i) {
  return s | (T(1) << i);
}
template <class T>
T offbit(T s, int i) {
  return s & (~(T(1) << i));
}
const double PI = 2 * acos(0.0);
const double eps = 1e-9;
const int infi = 1e9;
const long long Linfi = (long long)9e18;
const long long MOD = 1000000007;
struct node {
  int x, h, id;
  friend bool operator<(node A, node B) { return A.x < B.x; }
};
int n;
int tree[100005 * 4], res[100005], R[100005];
node P[100005];
void update(int i, int l, int r, int p, int val) {
  if (p < l || p > r) return;
  if (l == r) {
    tree[i] = val;
    return;
  }
  int mid = (l + r) >> 1;
  update(i * 2, l, mid, p, val);
  update(i * 2 + 1, mid + 1, r, p, val);
  tree[i] = max(tree[i * 2], tree[i * 2 + 1]);
}
int getmax(int i, int l, int r, int u, int v) {
  if (l > v || r < u) return -infi;
  if (l >= u && r <= v) return tree[i];
  int mid = (l + r) >> 1;
  return max(getmax(i * 2, l, mid, u, v), getmax(i * 2 + 1, mid + 1, r, u, v));
}
void solve() {
  sort(P + 1, P + n + 1);
  memset(tree, 0, sizeof(tree));
  for (int i = n; i >= 1; i--) {
    int low = i + 1, high = n, mid, ans = 0;
    R[i] = i;
    while (low <= high) {
      mid = (low + high) >> 1;
      if (P[mid].x - P[i].x < P[i].h) {
        ans = mid;
        low = mid + 1;
      } else
        high = mid - 1;
    }
    if (ans != 0) R[i] = getmax(1, 1, n, i + 1, ans);
    res[P[i].id] = R[i] - i + 1;
    update(1, 1, n, i, R[i]);
  }
  for (int i = 1; i <= n; i++) cout << res[i] << " ";
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> P[i].x >> P[i].h;
    P[i].id = i;
  }
  solve();
  return 0;
}
