#include <bits/stdc++.h>
using namespace std;

#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for(int64 i = 0;i < (n);i++)
#define FOR(i, a, b) for(int64 i = (a);i < (b);i++)
#define all(x) x.begin(),x.end()
#define fs first
#define sc second

using int32 = int_fast32_t;
using uint32 = uint_fast32_t;
using int64 = int_fast64_t;
using uint64 = uint_fast64_t;
using PII = pair<int32, int32>;
using PLL = pair<int64, int64>;

const double eps = 1e-10;

template<typename A, typename B>inline void chmin(A &a, B b){if(a > b) a = b;}
template<typename A, typename B>inline void chmax(A &a, B b){if(a < b) a = b;}

template<typename T>
vector<T> make_v(size_t a){return vector<T>(a);}

template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
	return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}

template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value!=0>::type
fill_v(U &u,const V... v){u=U(v...);}

template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value==0>::type
fill_v(U &u,const V... v){
	for(auto &e:u) fill_v<T>(e,v...);
}

template<::std::uint_fast64_t mod>
class ModInt{
private:
  using value_type = ::std::uint_fast64_t;
  value_type n;
public:
  ModInt() : n(0) {}
  ModInt(value_type n_) : n(n_ % mod) {}
  ModInt(const ModInt& m) : n(m.n) {}

  template<typename T>
  explicit operator T() const { return static_cast<T>(n); }
  value_type get() const { return n; }

  friend ::std::ostream& operator<<(::std::ostream &os, const ModInt<mod> &a) {
    return os << a.n;
  }

  friend ::std::istream& operator>>(::std::istream &is, ModInt<mod> &a) {
    value_type x;
    is >> x;
    a = ModInt<mod>(x);
    return is;
  }

  bool operator==(const ModInt& m) const { return n == m.n; }
  bool operator!=(const ModInt& m) const { return n != m.n; }
  ModInt& operator*=(const ModInt& m){ n = n * m.n % mod; return *this; }

  ModInt pow(value_type b) const{
    ModInt ans = 1, m = ModInt(*this);
    while(b){
      if(b & 1) ans *= m;
      m *= m;
      b >>= 1;
    }
    return ans;
  }

  ModInt inv() const { return (*this).pow(mod-2); }
  ModInt& operator+=(const ModInt& m){ n += m.n; n = (n < mod ? n : n - mod); return *this; }
  ModInt& operator-=(const ModInt& m){ n += mod - m.n; n = (n < mod ? n : n - mod); return *this; }
  ModInt& operator/=(const ModInt& m){ *this *= m.inv(); return *this; }
  ModInt operator+(const ModInt& m) const { return ModInt(*this) += m; }
  ModInt operator-(const ModInt& m) const { return ModInt(*this) -= m; }
  ModInt operator*(const ModInt& m) const { return ModInt(*this) *= m; }
  ModInt operator/(const ModInt& m) const { return ModInt(*this) /= m; }
  ModInt& operator++(){ n += 1; return *this; }
  ModInt& operator--(){ n -= 1; return *this; }
  ModInt operator++(int){
    ModInt old(n);
    n += 1;
    return old;
  }
  ModInt operator--(int){
    ModInt old(n);
    n -= 1;
    return old;
  }
  ModInt operator-() const { return ModInt(mod-n); }
};

template<::std::size_t size, ::std::uint_fast64_t mod=1000000007>
class Factorial{
private:
  using value_type = ModInt<mod>;
  ::std::vector<value_type> fact, inv;
public:
  Factorial() : fact(size+1, 1), inv(size+1, 1){
    for(::std::size_t i = 1; i <= size; ++i){
      fact[i] = fact[i-1] * value_type(i);
      inv[i] = fact[i].inv();
    }
  }

  value_type comb(::std::int64_t a, ::std::int64_t b){
    assert(a >= b);
    assert(b >= 0);
    return fact[a]*inv[b]*inv[a-b];
  }

  value_type& operator[](::std::size_t k){ return fact[k]; }
};

template<class ValueMonoid, template<class...> class Container=::std::vector>
class SegTree{
public:
  using value_structure = ValueMonoid;
  using value_type = typename value_structure::value_type;
  using const_reference = const value_type &;
  using container_type = Container<value_type>;
  using size_type = typename container_type::size_type;

private:
  ::std::vector<value_type> tree;
  size_type size_;

  static size_type getsize(const size_type x){
    size_type ret = 1;
    while(ret < x)
      ret <<= 1;
    return ret;
  }

  inline value_type calc(const value_type a, const value_type b){
    return value_structure::operation(a, b);
  }

  inline void calc_node(const size_type index){
    if(tree.size() <= (index << 1 | 1)) return;
    tree[index] = value_structure::operation(tree[index<<1], tree[index<<1 | 1]);
  }
public:
  SegTree() : size_(0), tree(){}
  SegTree(const size_type size)
    : size_(size), tree(size << 1, value_structure::identity()){}
  template<class InputIterator>
  SegTree(InputIterator first, InputIterator last)
    : size_(::std::distance(first, last)){
    tree = container_type(size_, value_structure::identity());
    tree.insert(tree.end(), first, last);
    for(size_type i = size_;i > 0;i--){
      calc_node(i);
    }
  }

  size_type size() const { return size_; }
  const_reference operator[](const size_type k) const {
    assert(k < size_);
    return tree[k+size_];
  }

  value_type query(size_type l, size_type r){
    assert(l <= r);
    assert(0 <= l && l < size_);
    assert(0 <= r && r <= size_);
    value_type retl = value_structure::identity(), retr = value_structure::identity();
    for(l += size_, r += size_; l < r ; l >>= 1, r >>= 1){
      if(l&1) retl = calc(retl, tree[l++]);
      if(r&1) retr = calc(tree[--r], retr);
    }
    return calc(retl, retr);
  }

  template<class F>
  void update(size_type index, const F& f){
    assert(0 <= index && index < size());
    index += size_;
    tree[index] = f(::std::move(tree[index]));
    while(index >>= 1)
      calc_node(index);
  }

  /*
  template<class F>
  size_type search(const F& f) const { // [0, result) is True and [0, result-1) is not.
    if(f(value_structure::identity()))
      return 0;
    if(!f(tree[1]))
      return size_+1;
    value_type acc = value_structure::identity();
    size_type i = 1;
    while(i <
  }
  */
};

int64 mpow(int64 a, int64 b, int64 m) {
  if (b == 0) return 1;
  if (b % 2) return a * mpow(a, b-1, m) % m;
  int64 ret = mpow(a, b/2, m);
  return ret*ret%m;
}

constexpr int64 mod = 998244353;
using Mint = ModInt<mod>;

class v_monoid {
public:
  using value_type = Mint;
  static value_type identity() { return 0; }
  static value_type initializer() { return 0; }
  static value_type operation(const value_type& a, const value_type& b) {
    return a + b;
  }
};

class mx_monoid {
public:
  using value_type = int64;
  static value_type identity() { return 0; }
  static value_type initializer() { return -INF_LL; }
  static value_type operation(const value_type& a, const value_type& b) {
    return max(a, b);
  }
};

int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int64 N;
  cin >> N;
  vector<PLL> XD(N);
  REP(i, N) {
    cin >> XD[i].fs >> XD[i].sc;
  }
  sort(all(XD));
  SegTree<v_monoid> dp(N+1);
  SegTree<mx_monoid> R(N+1); R.update(N, [&](const int64& x) { return N; });
  dp.update(N, [](const Mint& x) { return 1; });
  for (int64 i = N-1; i >= 0; i--) {
    int64 idx = lower_bound(all(XD), PLL(XD[i].fs+XD[i].sc, -INF_LL))-XD.begin();
    idx = max(idx, R.query(i+1, idx));
    R.update(i, [&](const int64& x) { return idx; });
    dp.update(i, [&](const Mint& x) { return dp.query(idx, N+1); });
  }
//  REP(i, N+1) {
//    cout << dp.query(i, i+1) << " ";
//  }
//  cout << endl;
  cout << dp.query(0, N+1) << endl;
}


Measured memory_bytes: 9600