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

// {{{ ModInt
template<int _MOD>
struct ModInt {
	static const auto MOD = _MOD;
	template<class T> using integral_only = typename enable_if<is_integral<T>::value>::type;

    int x;   
	constexpr ModInt() : x() {}

	template<class T, integral_only<T>* = nullptr>
    ModInt(T _x=0) {
		x = _x % MOD;
		if(x<0) x+=MOD;
	}
    ModInt operator-() const { return {x == 0? 0 : MOD-x}; }
    ModInt& operator+=(const ModInt a) {
        if ((x += a.x) >= MOD) x -= MOD;
        return *this;
    }
    ModInt& operator-=(const ModInt a) {
        if ((x += MOD-a.x) >= MOD) x -= MOD;
        return *this;
    }
    ModInt& operator*=(const ModInt a) {
        x = (long long)x * a.x % MOD;
        return *this;
    }
    ModInt& operator/=(const ModInt a) {
        return (*this) *= a.inv();
    }

    ModInt operator+(const ModInt a) const { return ModInt(*this) += a; }
    ModInt operator-(const ModInt a) const { return ModInt(*this) -= a; }
    ModInt operator*(const ModInt a) const { return ModInt(*this) *= a; }
    ModInt operator/(const ModInt a) const { return ModInt(*this) /= a; }
    ModInt inv() const {
	    // for prime MOD
        return pow(MOD-2);
    }
	ModInt inv2() const {
		// work for non-prime MOD if gcd(x,MOD) = 1
		int a = x, b = MOD, u = 1, v = 0;
		while(b != 0) {
			int t = a / b;
			a -= t * b;
			u -= t * v;
			swap(a, b);
			swap(u, v);
		}
		return u;
	}
	template<class T, integral_only<T>* = nullptr>
    ModInt pow(T t) const {
		ModInt r = 1, p = *this;
		while(t) {
			if(t & 1) r *= p;
			p *= p;
			t >>= 1;
		}
        return r;
    }

    bool operator==(ModInt rhs) const { return x == rhs.x; }
    bool operator!=(ModInt rhs) const { return x != rhs.x; }
    bool operator<(ModInt rhs) const { return x < rhs.x; }
    bool operator<=(ModInt rhs) const { return x <= rhs.x; }
    bool operator>(ModInt rhs) const { return x > rhs.x; }
    bool operator>=(ModInt rhs) const { return x >= rhs.x; }

    friend string to_string(ModInt i) { return to_string(i.x); }
    friend istream& operator>>(istream&i,ModInt&a) { return i>>a.x; }
    friend ostream& operator<<(ostream&o,const ModInt&a) { return o<<a.x; }
};

const int MOD=998244353;
using mint=ModInt<MOD>;
// }}}

template<typename T>
struct Segtree {
    int n;
    T e; // default value
    vector<T> dat;
    typedef function<T(T a, T b)> Func;
    Func f;

    Segtree(){}
    Segtree(int n_input, Func f_input, T e_input) {
        initialize(n_input, f_input, e_input);
    }

    void initialize(int n_input, Func f_input, T e_input) {
        f = f_input;
        e = e_input;
        n = 1;
        while(n < n_input) { n<<=1; }
        dat.resize(2*n-1, e);
    }

    void update(int k, T a) {
        k += n-1;
        dat[k] = a;
        while(k > 0) {
            k = (k-1)/2;
            dat[k] = f(dat[2*k+1], dat[2*k+2]);
        }
    }

    T get(int k) {
        return dat[k+n-1];
    }
    // [a, b)
    T query(int a, int b) {
        return _query(a, b, 0, 0, n);
    }

    // [a, b)
    T _query(int a, int b, int k, int l, int r) {
        if(r<=a || b<=l) return e;
        if(a<=l && r<=b) return dat[k];
        T vl = _query(a, b, 2*k+1, l, (l+r)/2);
        T vr = _query(a, b, 2*k+2, (l+r)/2, r);
        return f(vl, vr);
    }
};
/** Usage:
Segtree<int> seg(n, [](int a, int b) {return max(a,b);}, 0); // init
REP(i, n+1) st.update(i, i)
st.query(a, b)
*/

const int N=2e5+10;
pair<int,int> P[N]; // X, D
int x[N],y[N]; // X, X+D
mint dp[N];
int main() {
	int n;
	scanf("%d", &n);
	Segtree<int> seg(n, [](int a, int b) {return max(a,b);}, 0); // init
	for(int i=0; i<n; i++)
		scanf("%d %d", &P[i].first,&P[i].second);
	// sort x coordinate
	sort(P,P+n);
	for(int i=0; i<n; i++) {
		x[i]=P[i].first;
		y[i]=P[i].first+P[i].second;
	}

	vector<int> next(n); // next[i]: 機器人i最遠可以啟動的機器人j
	for(int i=n-1; i>=0; i--) {
		next[i]=i;
		int j=lower_bound(x, x+n, y[i])-x;
		// robot activate [xi, xi+di)
		if ( i+1<j ) {
			next[i]=seg.query(i, j);
		}
		seg.update(i,next[i]);
	}
	dp[0]=1;
	for(int i=0; i<n; i++) {
		dp[i+1]+=dp[i];
		dp[next[i]+1]+=dp[i];
	}
	cout << dp[n] << '\n';
	return 0;
}

Measured memory_bytes: 7040