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

constexpr int MOD = 998244353;
constexpr int MAX = 200200;

template<int mod> struct ModInt {
    int x;
    ModInt() : x(0) {}
    ModInt(long long y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {}
    ModInt &operator+=(const ModInt &p) { if((x += p.x) >= mod) x -= mod; return *this; }
    ModInt &operator-=(const ModInt &p) { if((x += mod-p.x) >= mod) x -= mod; return *this; }
    ModInt &operator*=(const ModInt &p) { x = (int)(1LL*x*p.x%mod); return *this; }
    ModInt &operator/=(const ModInt &p) { *this *= p.inverse(); return *this; }
    ModInt operator-() const { return ModInt(-x); }
    ModInt operator+(const ModInt &p) const { return ModInt(*this) += p; }
    ModInt operator-(const ModInt &p) const { return ModInt(*this) -= p; }
    ModInt operator*(const ModInt &p) const { return ModInt(*this) *= p; }
    ModInt operator/(const ModInt &p) const { return ModInt(*this) /= p; }
    bool operator==(const ModInt &p) const { return x == p.x; }
    bool operator!=(const ModInt &p) const { return x != p.x; }
    ModInt inverse() const {
        int a = x, b = mod, u = 1, v = 0, t;
        while(b > 0) { t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); }
        return ModInt(u);
    }
    ModInt pow(long long e){
        long long a = 1, p = x;
        while(e > 0) {
            if (e & 1) {a = (a * p) % mod; e--;}
            else {p = (p * p) % mod; e /= 2;}
        }
        return ModInt(a);
    }
    friend ostream &operator<<(ostream &os, const ModInt<mod> &p) {
        return os << p.x;
    }
    friend istream &operator>>(istream &is, ModInt<mod> &a) {
        long long x;
        is >> x;
        a = ModInt<mod>(x);
        return (is);
    }
};

template<typename T>
struct SegmentTree {
    using F = function<T(T, T)>;
private : 
    const T id;
    const F f;
    int n;
    vector<T> node;

public : 
    SegmentTree (const F &f, const T &id) : 
        f(f), id(id) { }

    void init (int sz) {
        assert(0 < sz);
        n = 1;
        while (n < sz) n <<= 1;
        node.resize(2*n, id);
    }

    void build (vector<T> v) {
        init((int)v.size());
        for (int i = 0; i < (int)v.size(); i++) node[i+n] = v[i];
        for (int i = n-1; i > 0; i--) node[i] = f(node[i<<1|0], node[i<<1|1]);
    }

    void update (int i, const T &x) {
        assert((i += n) < node.size());
        node[i] = x;
        while (i > 0) {
            i >>= 1;
            node[i] = f(node[i<<1], node[i<<1|1]);
        }
    }

    const T fold (int l, int r) const {
        assert(l <= r);
        T vl = id, vr = id;
        for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
            if (l&1) vl = f(vl, node[l++]);
            if (r&1) vr = f(node[--r], vr);
        }
        return f(vl, vr);
    }

    const T &operator[] (int i) const {
        assert(i += n < node.size());
        return node[i];
    }

};

int main() {
    int n;
    cin >> n;
    vector<int> x(n), d(n);
    {
        vector<pair<int, int>> vec(n);
        for (auto &e : vec) cin >> e.first >> e.second;
        sort(vec.begin(), vec.end());
        for (int i = 0; i < n; i++) tie(x[i], d[i]) = vec[i];
    }

    vector<int> idx(n, -1);
    {
        vector<pair<int, int>> dat;
        for (int i = 0; i < n; i++) {
            int j = (lower_bound(x.begin(), x.end(), x[i] + d[i]) - x.begin());
            dat.emplace_back(j, i);
        }
        auto f = [](pair<int, int> a, pair<int, int> b) { return max(a, b); };
        SegmentTree<pair<int, int>> seg(f, pair<int, int>(-1, -1));
        seg.build(dat);
        auto dfs = [&] (auto f, int i) -> int {
            if (idx[i] != -1) return idx[i];
            if (dat[i].first == n) return (idx[i] = n);
            pair<int, int> p = seg.fold(i, dat[i].first);
            if (p == dat[i]) return idx[i] = p.second;
            return (idx[i] = f(f, p.second));
        };
        for (int i = 0; i < n; i++) dfs(dfs, i);
    }

    SegmentTree<ModInt<MOD>> dp([](ModInt<MOD> a, ModInt<MOD> b) { return (a + b); }, 0);
    dp.init(MAX);
    dp.update(n + 1, 1);

    for (int i = n - 1; i >= 0; i--) {
        ModInt<MOD> val = dp.fold(idx[i] + 1, MAX);
        dp.update(i, val);
    }

    cout << dp.fold(0, n + 1) + 1 << '\n';

    return 0;
}

Measured memory_bytes: 11876