#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <climits>
#include <cstring>
#include <cassert>

#define rep(i, m, n) for(int i=int(m);i<int(n);i++)
#define all(c) begin(c),end(c)

template<typename T1, typename T2>
inline void chmin(T1 &a, T2 b) { if (a > b) a = b; }

template<typename T1, typename T2>
inline void chmax(T1 &a, T2 b) { if (a < b) a = b; }

typedef long long int ll;
using ll = long long int;
using ull = long long unsigned int;
using Int = long long int;
using namespace std;
#define INF (1 << 30) - 1
#define INFl (ll)5e15
#define DEBUG 0
#define dump(x)  cerr << #x << " = " << (x) << endl
#define MOD 998244353


//edit
class Mint {
    using u64 = std::uint_fast64_t;
    u64 Modulus = MOD;

public:
    u64 a;

    constexpr Mint(const u64 x = 0) noexcept : a(x % Modulus) {}

    constexpr u64 &value() noexcept { return a; }

    constexpr const u64 &value() const noexcept { return a; }

    constexpr Mint operator+(const Mint rhs) const noexcept {
        return Mint(*this) += rhs;
    }

    constexpr Mint operator-(const Mint rhs) const noexcept {
        return Mint(*this) -= rhs;
    }

    constexpr Mint operator*(const Mint rhs) const noexcept {
        return Mint(*this) *= rhs;
    }

    constexpr Mint operator/(const Mint rhs) const noexcept {
        return Mint(*this) /= rhs;
    }

    constexpr Mint &operator+=(const Mint rhs) noexcept {
        a += rhs.a;
        if (a >= Modulus) {
            a -= Modulus;
        }
        return *this;
    }

    constexpr Mint &operator-=(const Mint rhs) noexcept {
        if (a < rhs.a) {
            a += Modulus;
        }
        a -= rhs.a;
        return *this;
    }

    constexpr Mint &operator*=(const Mint rhs) noexcept {
        a = a * rhs.a % Modulus;
        return *this;
    }

    constexpr Mint &operator/=(Mint rhs) noexcept {
        u64 exp = Modulus - 2;
        while (exp) {
            if (exp % 2) {
                *this *= rhs;
            }
            rhs *= rhs;
            exp /= 2;
        }
        return *this;
    }

    constexpr Mint &pow(int rhs) noexcept {
        u64 exp = static_cast<u64>(rhs);
        Mint base(a);
        a = 1;
        while (exp) {
            if (exp % 2) {
                *this *= base;
            }
            base *= base;
            exp /= 2;
        }
        return *this;
    }

};

template<typename T, typename E, typename F, typename G>
class SegmentTree {
    int N;
    F f;
    G g;
    T ti;
    vector<T> dat;

public:
    SegmentTree(int n, F f, G g, T ti) : N(1), f(f), g(g), ti(ti) {
        while (N < n) {
            N <<= 1;
        }
        dat.resize(2 * N - 1, ti);
    }

    void build(int n, vector<T> v) {
        for (int i = 0; i < n; ++i) {
            dat[i + N - 1] = v[i];
        }
        for (int i = N - 2; i >= 0; --i) {
            dat[i] = f(dat[i * 2 + 1], dat[i * 2 + 2]);
        }
    }

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

    T query(int a, int b, int k, int l, int r) {
        if (r <= a || b <= l) {
            return ti;
        } else if (a <= l && r <= b) {
            return dat[k];
        } else {
            T left = query(a, b, k * 2 + 1, l, (l + r) / 2);
            T right = query(a, b, k * 2 + 2, (l + r) / 2, r);
            return f(left, right);
        }
    }

    T query(int a, int b) {
        return query(a, b, 0, 0, N);
    }

};

class Solve {
public:
    void solve() {
        Int N;
        cin >> N;
        vector<pair<Int, Int>> xd(N);
        for (int i = 0; i < N; ++i) {
            cin >> xd[i].first >> xd[i].second;
        }

        sort(all(xd));
        vector<Int> x;
        for (int i = 0; i < N; ++i) {
            x.push_back(xd[i].first);
        }
        x.push_back(INFl);

        using T = Int;
        using E = Int;
        T ti = 0;
        auto f = [](T a, T b) -> T {
            return max(a, b);
        };
        auto g = [](T a, E b) -> T {
            return b;
        };

        SegmentTree<T, E, decltype(f), decltype(g)> next(N, f, g, ti);
//        vector<Int> next(N);
//        next[N - 1] = N - 1;
        next.update(N - 1, N - 1);
        for (int i = N - 2; i >= 0; --i) {
            Int idx = lower_bound(all(x), x[i] + xd[i].second) - x.begin() - 1;
            if (idx == i) {
//                next[i] = i;
                next.update(i, i);
            } else {
//                next[i] = next[idx];
                next.update(i, next.query(i, idx + 1));
            }
        }

//        for (int i = 0; i < N; ++i) next[i]++;

        vector<Mint> dp(N + 1);
        dp[N] = 1;
        for (int i = N - 1; i >= 0; --i) {
            dp[i] += dp[i + 1];
//            Int idx = lower_bound(all(x), x[i] + xd[i].second) - x.begin();
            Int idx = next.query(i, i + 1) + 1;
            dp[i] += dp[idx];
        }
        cout << dp[0].value() << endl;

    }

};


int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);

    Solve().solve();


    return 0;
}


Measured memory_bytes: 12272