#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cfloat>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <string.h>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,n) for(int i=1;i<=(n);i++)
#define int long long
#define ll long long
#define mod (int)998244353
#define P pair<int,int>
#define prique(T) priority_queue<T,vector<T>,greater<T>>
#define all(V) V.begin(),V.end()
#ifdef int
constexpr int INF = LLONG_MAX / 10;
#else
constexpr int INF = INT_MAX / 10;
#endif
constexpr double eps = DBL_EPSILON;
template <class T, class U>
inline bool chmax(T& lhs, const U& rhs) {
	if (lhs < rhs) {
		lhs = rhs;
		return 1;
	}
	return 0;
}
template <class T, class U>
inline bool chmin(T& lhs, const U& rhs) {
	if (lhs > rhs) {
		lhs = rhs;
		return 1;
	}
	return 0;
}
using namespace std;
inline int gcd(int a, int b) {
	while (b) {
		int c = a;
		a = b; b = c % b;
	}
	return a;
}
inline int lcm(int a, int b) {
	return a / gcd(a, b) * b;
}
bool isprime(int n) {
	if (n == 1)return false;
	for (int i = 2; i * i <= n; i++) {
		if (n % i == 0)return false;
	}
	return true;
}
int mypow(int a, int b) {
	if (!b)return 1;
	if (b & 1)return mypow(a, b - 1) * a;
	int memo = mypow(a, b >> 1);
	return memo * memo;
}
int modpow(int a, int b, int m = mod) {
	if (!b)return 1;
	if (b & 1)return modpow(a, b - 1, m) * a % m;
	int memo = modpow(a, b >> 1, m);
	return memo * memo % m;
}
class modInt {
	int value, modulo;
public:
	modInt() : value(0), modulo(mod) { value = 0; }
	template<typename T>
	modInt(T value = 0, int modulo = mod) : value(value), modulo(modulo) {
		if (value < 0) {
			value = -value;
			value %= modulo;
			value = -value;
			value += modulo;
		}
		this->value = value % modulo;
	}
	inline operator int()const { return value; }
	inline modInt& operator+=(modInt x) {
		value += x.value;
		if (value >= modulo)value -= modulo;
		return *this;
	}
	inline modInt& operator++() {
		if (value == modulo - 1)value = 0;
		else value++;
		return *this;
	}
	inline modInt& operator-()const {
		return modInt(0) -= *this;
	}
	inline modInt& operator-=(modInt x) {
		value -= x.value;
		if (value < 0)value += modulo;
		return *this;
	}
	inline modInt& operator--() {
		if (value == 0)value = modulo - 1;
		else value--;
		return *this;
	}
	inline modInt& operator*=(modInt x) {
		value = value * x.value % modulo;
		return *this;
	}
	inline modInt& operator/=(modInt x) {
		return operator*=(x.inv());
	}
	inline modInt inv() {
		return modpow(*this, modulo - 2);
	}
	template<typename T> modInt operator+(T x) { return modInt(*this) += x; }
	template<typename T> modInt& operator+=(T x) { return operator+=(modInt(x, modulo)); }
	template<typename T> modInt operator-(T x) { return modInt(*this) -= x; }
	template<typename T> modInt& operator-=(T x) { return operator-=(modInt(x, modulo)); }
	template<typename T> modInt operator*(T x) { return modInt(*this) *= x; }
	template<typename T> modInt& operator*=(T x) { return operator*=(modInt(x, modulo)); }
	template<typename T> modInt operator/(T x) { return modInt(*this) /= x; }
	template<typename T> modInt& operator/=(T x) { return operator/=(modInt(x, modulo)); }
};
istream& operator>>(istream& ist, modInt& x) {
	int a;
	ist >> a;
	x = a;
	return ist;
}
modInt modpow(modInt a, int b) {
	if (!b)return modInt(1);
	if (b & 1)return modpow(a, b - 1) * a;
	modInt memo = modpow(a, b / 2);
	return memo * memo;
}
template<typename T, typename U>
class SegTree {
	int n = 1;
	T* node = NULL;
	U* lazy = NULL;
	bool* lazyflag = NULL;
	T nodee;
	function<T(T, T)> nodef;
	function<U(U, U)> lazyf;
	function<T(T, U, int, int)> updf;
	void eval(int k, int l, int r) {
		if (lazyflag[k]) {
			node[k] = updf(node[k], lazy[k], l, r);
			if (r - l > 1) {
				if (lazyflag[2 * k + 1])lazy[2 * k + 1] = lazyf(lazy[2 * k + 1], lazy[k]);
				else lazy[2 * k + 1] = lazy[k];
				if (lazyflag[2 * k + 2])lazy[2 * k + 2] = lazyf(lazy[2 * k + 2], lazy[k]);
				else lazy[2 * k + 2] = lazy[k];
				lazyflag[2 * k + 1] = lazyflag[2 * k + 2] = true;
			}
			lazyflag[k] = false;
		}
	}
public:
	SegTree(int m, T init, T nodee, function<T(T, T)> nodef, function<U(U, U)> lazyf, function<T(T, U, int, int)> updf) :nodee(nodee), nodef(nodef), lazyf(lazyf), updf(updf) {
		delete[] node;
		delete[] lazy;
		while (n < m)n *= 2;
		node = new T[2 * n], lazy = new U[2 * n], lazyflag = new bool[2 * n];
		for (int i = n - 1; i < 2 * n - 1; i++)node[i] = init;
		for (int i = n - 2; i >= 0; i--)node[i] = nodef(node[2 * i + 1], node[2 * i + 2]);
		rep(i, 2 * n)lazyflag[i] = false;
	}
	SegTree(int m, T nodee, function<T(T, T)> nodef, function<U(U, U)> lazyf, function<T(T, U, int, int)> updf, vector<T> initvec) :nodee(nodee), nodef(nodef), lazyf(lazyf), updf(updf) {
		if (m != initvec.size()) {
			cerr << "Invalid Initialization of SegmentTree" << endl;
			exit(1);
		}
		delete[] node;
		delete[] lazy;
		while (n < m)n *= 2;
		node = new T[2 * n], lazy = new U[2 * n], lazyflag = new bool[2 * n];
		for (int i = n - 1; i < 2 * n - 1; i++) {
			if (i - n + 1 < m)node[i] = initvec[i - n + 1];
			else node[i] = nodee;
		}
		for (int i = n - 2; i >= 0; i--)node[i] = nodef(node[2 * i + 1], node[2 * i + 2]);
		rep(i, 2 * n)lazyflag[i] = false;
	}
	~SegTree() {
		delete[] node;
		delete[] lazy;
	}
	void update(int a, int b, U x, int k = 0, int l = 0, int r = -1) {
		if (r == -1)r = n;
		eval(k, l, r);
		if (b <= l || r <= a)return;
		if (a <= l && r <= b) {
			lazyflag[k] = true;
			lazy[k] = x;
			eval(k, l, r);
		}
		else {
			update(a, b, x, 2 * k + 1, l, (l + r) / 2);
			update(a, b, x, 2 * k + 2, (l + r) / 2, r);
			node[k] = nodef(node[2 * k + 1], node[2 * k + 2]);
		}
	}
	T query(int a, int b, int k = 0, int l = 0, int r = -1) {
		if (r == -1)r = n;
		eval(k, l, r);
		if (b <= l || r <= a)return nodee;
		if (a <= l && r <= b)return node[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 nodef(vl, vr);
	}
};
class RAQRSQ :public SegTree<int, int> {
public:
	RAQRSQ(int size, const int& def = 0) :SegTree<int, int>(size, def, 0, [](int a, int b) {return a + b; }, [](int a, int b) {return a + b; }, [](int a, int b, int l, int r) {return a + (r - l) * b; }) {};
};
class RAQRMiQ :public SegTree<int, int> {
	using base = SegTree<int, int>;
public:
	RAQRMiQ(int size, const int& def = 0) :base(size, def, INF, [](int a, int b) {return min(a, b); }, [](int a, int b) {return a + b; }, [](int a, int b, int l, int r) {return a + b; }) {};
};
class RAQRMaQ :public SegTree<int, int> {
	using base = SegTree<int, int>;
public:
	RAQRMaQ(int size, const int& def = 0) :base(size, def, -INF, [](int a, int b) {return max(a, b); }, [](int a, int b) {return a + b; }, [](int a, int b, int l, int r) {return a + b; }) {};
};
class RUQRSQ :public SegTree<int, int> {
	using base = SegTree<int, int>;
public:
	RUQRSQ(int size, const int& def = 0) :base(size, def, 0, [](int a, int b) {return a + b; }, [](int a, int b) {return b; }, [](int a, int b, int l, int r) {return (r - l) * b; }) {};
};
class RUQRMiQ :public SegTree<int, int> {
	using base = SegTree<int, int>;
public:
	RUQRMiQ(int size, const int& def = 0) :base(size, def, INF, [](int a, int b) {return min(a, b); }, [](int a, int b) {return b; }, [](int a, int b, int l, int r) {return b; }) {};
};
class RUQRMaQ :public SegTree<int, int> {
	using base = SegTree<int, int>;
public:
	RUQRMaQ(int size, const int& def = 0) :base(size, def, -INF, [](int a, int b) {return max(a, b); }, [](int a, int b) {return b; }, [](int a, int b, int l, int r) {return b; }) {};
};
int n;
P x[200010];
modInt memo[200010];
signed main() {
	cin >> n;
	rep(i, n)cin >> x[i].first >> x[i].second;
	sort(x, x + n);
	RUQRMaQ st(n, -1);
	rep(i, n) {
		int r = upper_bound(x, x + n, make_pair(x[i].first + x[i].second, -INF)) - x;
		if (i + 1 < r)st.update(i + 1, r, i);
	}
	fill(memo, memo + n, 1);
	modInt ans = 1;
	for (int i = n - 1; i >= 0; i--) {
		memo[i] += 1;
		if (st.query(i, i + 1) == -1)ans *= memo[i];
		else memo[st.query(i, i + 1)] *= memo[i];
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 14720