#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using PII = pair<int, int>;
using VI = vector<int>;
const LL MOD = 998244353;
inline LL mul(LL a, LL b) { return a * b % MOD; }
inline LL add(LL a, LL b) { return (a + b) % MOD; }
LL modpow(LL a, LL n) {
  LL res = 1;
  for (; n > 0; n >>= 1) {
    if (n & 1) res = mul(res, a);
    a = mul(a, a);
  }
  return res;
}
inline LL modinv(LL a) { return modpow(a, MOD - 2); }
struct Matrix {
  LL v[2][2];
  Matrix(int d = 0) {
    memset(v, 0, sizeof v);
    if (d) v[0][0] = v[1][1] = d;
  }
  Matrix operator+(const Matrix& m) const {
    Matrix res;
    for (int i : {0, 1}) {
      for (int j : {0, 1}) {
        res.v[i][j] = add(v[i][j], m.v[i][j]);
      }
    }
    return res;
  }
  Matrix operator*(const Matrix& m) const {
    Matrix res;
    for (int i : {0, 1}) {
      for (int j : {0, 1}) {
        for (int k : {0, 1}) {
          res.v[i][j] += mul(v[i][k], m.v[k][j]);
        }
        res.v[i][j] %= MOD;
      }
    }
    return res;
  }
  LL sum_all() const {
    LL res = 0;
    for (int i : {0, 1}) {
      for (int j : {0, 1}) {
        res += v[i][j];
      }
    }
    return res % MOD;
  }
};
Matrix ID(1);
struct SegmentTree {
  int sz;
  vector<Matrix> tree;
  void merge(int node) { tree[node] = tree[2 * node + 1] * tree[2 * node]; }
  SegmentTree(int n) {
    for (sz = 1; sz < n; sz <<= 1)
      ;
    tree.resize(2 * sz);
  }
  void update(int i, int x, int y, LL val) {
    int node = sz + i;
    tree[node].v[x][y] = val;
    for (node /= 2; node >= 1; node /= 2) {
      merge(node);
    }
  }
  Matrix query(int l, int r, int node = 1, int x = 0, int y = -1) {
    if (y == -1) y = sz;
    if (l >= y || r <= x) return ID;
    if (l <= x && y <= r) return tree[node];
    return query(l, r, 2 * node + 1, (x + y) / 2, y) *
           query(l, r, 2 * node, x, (x + y) / 2);
  }
};
using Frac = pair<LL, LL>;
using Event = pair<Frac, int>;
bool cmpFrac(const Frac& a, const Frac& b) {
  return a.first * b.second < b.first * a.second;
}
struct Info {
  int i, righti, rightii;
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<LL> x(n + 1), v(n + 1), lt(n + 1), rt(n + 1);
  const LL inv100 = modinv(100);
  for (int i = 1; i <= n; i++) {
    LL p;
    cin >> x[i] >> v[i] >> p;
    p = mul(p, inv100);
    rt[i] = p;
    lt[i] = add(1, MOD - p);
  }
  SegmentTree pre(n + 2);
  pre.update(1, 0, 0, lt[1]);
  pre.update(1, 1, 1, rt[1]);
  vector<Event> events;
  vector<Info> info;
  for (int i = 1; i + 1 <= n; i++) {
    LL gap = x[i + 1] - x[i];
    for (bool righti : {0, 1}) {
      for (bool rightii : {0, 1}) {
        LL rvel = (rightii ? -1 : 1) * v[i + 1] - (righti ? -1 : 1) * v[i];
        if (rvel <= 0) {
          pre.update(i + 1, rightii, righti, rightii ? rt[i + 1] : lt[i + 1]);
        } else {
          Frac tm(gap, rvel);
          events.push_back({tm, info.size()});
          info.push_back({i, righti, rightii});
        }
      }
    }
  }
  sort(events.rbegin(), events.rend(), [](const Event& a, const Event& b) {
    return cmpFrac(a.first, b.first);
  });
  LL ans = 0;
  LL tot = pre.query(1, n + 1).sum_all();
  for (auto& e : events) {
    auto tm = e.first;
    int idx = e.second;
    int i = info[idx].i;
    int righti = info[idx].righti;
    int rightii = info[idx].rightii;
    pre.update(i + 1, rightii, righti, rightii ? rt[i + 1] : lt[i + 1]);
    auto res = pre.query(1, n + 1);
    LL acttm = mul(tm.first, modinv(tm.second));
    LL cur = res.sum_all();
    cur = add(cur, MOD - tot);
    ans = add(ans, mul(acttm, cur));
    tot = add(cur, tot);
  }
  cout << ans << '\n';
  return 0;
}
