//
// Created by Hideaki Imamura on 2020-03-07.
//
# include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef pair <ll, ll> l_l;
typedef pair<int, int> i_i;

template<class T>
inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

template<class T>
inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}

# define EPS (1e-7)
# define INF (INT_MAX)
# define PI (acos(-1))
//const ll mod = 1000000007;
const ll mod = 998244353;

template<class T>
void print_vec(vector <T> v) {
    for (auto x : v) {
        cout << x << " ";
    }
    cout << endl;
}

// T0: 元の配列のモノイド
// T1: T0に対する作用素モノイド
template<class T0, class T1, class F0, class F1, class G, class P>
class LazySegmentTree {
    // k番目のノードにのlazyを伝搬
    void eval(int k, int len) {
        // 定数倍高速化
        if (lazy[k] == u1) return;
        // len個分のlazy[k]を評価
        node[k] = g(node[k], p(lazy[k], len));
        if (k < N - 1) {
            // 最下段でなければ下のlazyに伝搬
            lazy[2 * k + 1] = f1(lazy[2 * k + 1], lazy[k]);
            lazy[2 * k + 2] = f1(lazy[2 * k + 2], lazy[k]);
        }
        lazy[k] = u1;
    }

    // k番目のノード[l, r)について、[a, b)の範囲内にxを作用
    void update(int a, int b, T1 x, int k, int l, int r) {
        eval(k, r - l);
        if (b <= l || r <= a) return;
        if (a <= l && r <= b) {
            lazy[k] = f1(lazy[k], x);
            eval(k, r - l);
        } 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] = f0(node[2 * k + 1], node[2 * k + 2]);
        }
        //cout << "Update:";
        //print_vec(node);
    }

    // k番目のノード[l, r)について、[a, b)のクエリを求める
    T0 query(int a, int b, int k, int l, int r) {
        if (r <= a || b <= l) return u0;
        eval(k, r - l);
        if (a <= l && r <= b) return node[k];
        T0 vl = query(a, b, 2 * k + 1, l, (l + r) / 2);
        T0 vr = query(a, b, 2 * k + 2, (l + r) / 2, r);
        //cout << "Query:";
        //print_vec(node);
        return f0(vl, vr);
    }

public:
    int sz;  // 元の配列のサイズ
    int N;
    vector <T0> node;
    vector <T1> lazy;
    // T0上の演算、単位元
    const F0 f0;
    const T0 u0;
    // T1上の演算、単位元
    const F1 f1;
    const T1 u1;
    // T0に対するT1の作用
    const G g;
    // 多数のt1(T1)に対するf1の合成
    const P p;

    LazySegmentTree(F0 f0, T0 u0, F1 f1, T1 u1, G g, P p) : f0(f0), u0(u0), f1(f1), u1(u1), g(g), p(p) {}

    void set_by_vector(const vector <T0> &a) {
        sz = a.size();
        for (N = 1; N < sz; N *= 2);
        node.resize(2 * N - 1, u0);
        lazy.resize(2 * N - 1, u1);
        for (int i = 0; i < sz; i++) node[N - 1 + i] = a[i];
        for (int i = N - 2; i >= 0; i--) node[i] = f0(node[2 * i + 1], node[2 * i + 2]);
    }

    void set_by_unit(int n) {
        sz = n;
        for (N = 1; N < sz; N *= 2);
        node.resize(2 * N - 1, u0);
        lazy.resize(2 * N - 1, u1);
    }

    // [a, b)にxを作用
    void update(int a, int b, T1 x) {
        assert(0 <= a && a < b && b <= sz);
        update(a, b, x, 0, 0, N);
    }

    void update(int a, T1 x) { update(a, a + 1, x); }

    // [a, b)
    T0 query(int a, int b) { return query(a, b, 0, 0, N); }

    T0 query(int a) { return query(a, a + 1); }

    friend string to_string(LazySegmentTree<T0, T1, F0, F1, G, P> &seg) {
        for (int i = 0; i < seg.sz; i++) seg.query(i);
        return to_string(vector<T0>(seg.node.begin() + (seg.N - 1), seg.node.begin() + (seg.N - 1 + seg.sz)));
    }
};

template<class T0, class T1, class F0, class F1, class G, class P>
auto make_lazy_segment_tree(F0 f0, T0 u0, F1 f1, T1 u1, G g, P p) {
    return LazySegmentTree<T0, T1, F0, F1, G, P>(f0, u0, f1, u1, g, p);
}

inline ll take_mod(ll a) {
    return (a % mod + mod) % mod;
}

inline ll add(ll a, ll b) {
    return take_mod(a + b);
}

inline ll sub(ll a, ll b) {
    return take_mod(a - b);
}

inline ll mul(ll a, ll b) {
    return take_mod(a * b);
}

inline ll mod_pow(ll x, ll n) {
    ll res = 1LL;
    while (n > 0) {
        if (n & 1) res = mul(res, x);
        x = mul(x, x);
        n >>= 1;
    }
    return res;
}

ll mod_inv(ll x) {
    return mod_pow(x, mod - 2);
}

int N;

int main() {
    cin >> N;
    vector <l_l> tmp;
    for (int i = 0; i < N; ++i) {
        ll tmp1, tmp2;
        cin >> tmp1 >> tmp2;
        tmp.emplace_back(l_l(tmp1, tmp2));
    }
    sort(tmp.begin(), tmp.end());
    vector <ll> X(N, 0), D(N, 0);
    for (int i = 0; i < N; ++i) {
        X[i] = tmp[i].first;
        D[i] = tmp[i].second;
    }

    const int u1 = - INF;
    auto seg = make_lazy_segment_tree<int, int>(
            [](int x, int y) { return max(x, y); }, -INF,
            [](int x, int y) { return y == u1 ? x : y; }, u1,
            [](int x, int y) { return y == u1 ? x : y; },
            [](int x, int len) { return x; });
    seg.set_by_unit(N);
    for (int i = 0; i < N; ++i) seg.update(i, i + 1);
    //cout << "hoge1" << endl;

    vector<int> R(200010, -1);
    for (int i = N - 1; i >= 0; --i) {
        int ind = lower_bound(X.begin(), X.end(), X[i] + D[i]) - X.begin();
        if (i + 1 == ind) {
            R[i] = i + 1;
        } else {
            R[i] = seg.query(i + 1, ind);
        }
        seg.update(i, R[i]);
        //cout << "ind: " << ind << endl;
        //cout << "R[i]: " << R[i] << endl;
    }
    //cout << "hoge2" << endl;

    vector <ll> dp(200010, 0);
    dp[0] = 1;
    for (int i = 0; i < N; ++i) {
        int idx = seg.query(i, i + 1);
        dp[idx] = add(dp[idx], dp[i]);
        dp[i + 1] = add(dp[i + 1], dp[i]);
    }
    cout << dp[N] << endl;
    return 0;
}

Measured memory_bytes: 13804