#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long num = 0, neg = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') neg = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    num = (num << 3) + (num << 1) + c - '0';
    c = getchar();
  }
  return num * neg;
}
const long long mod = 998244353;
struct mat {
  long long a[2][2];
  mat() {
    for (long long i = 0; i <= 1; i++)
      for (long long j = 0; j <= 1; j++) a[i][j] = 0;
  }
} tree[200010 << 2];
const long long INF = 0x7f7f7f7f7f7f7f;
struct node {
  long long pos, p1, p2, val;
  double t;
} side[800010];
long long cnt;
long long ans, x[200010], v[200010], p[200010], n;
bool cmp1(node x, node y) { return x.t < y.t; }
inline long long qpow(long long x, long long k) {
  long long res = 1;
  while (k) {
    if (k & 1) res = res * x % mod;
    x = x * x % mod;
    k >>= 1;
  }
  return res;
}
inline mat mul(mat x, mat y) {
  mat res;
  for (long long i = 0; i <= 1; i++)
    for (long long j = 0; j <= 1; j++)
      for (long long k = 0; k <= 1; k++)
        res.a[i][j] = (res.a[i][j] + x.a[i][k] * y.a[k][j] % mod) % mod;
  return res;
}
inline void insert(long long pos, long long p1, long long p2) {
  side[++cnt].pos = pos;
  side[cnt].p1 = p1, side[cnt].p2 = p2;
  if (p1 == 0 && p2 == 0) {
    long long tmp = v[pos] - v[pos - 1];
    if (tmp > 0)
      side[cnt].val = (x[pos] - x[pos - 1]) * qpow(tmp, mod - 2) % mod,
      side[cnt].t = (x[pos] - x[pos - 1]) * 1.0 / tmp;
    else
      side[cnt].val = INF, side[cnt].t = 1e20;
  }
  if (p1 == 0 && p2 == 1) side[cnt].val = INF, side[cnt].t = 1e20;
  if (p1 == 1 && p2 == 0)
    side[cnt].val = (x[pos] - x[pos - 1]) % mod *
                    qpow((v[pos] + v[pos - 1]) % mod, mod - 2) % mod,
    side[cnt].t = (x[pos] - x[pos - 1]) * 1.0 / (v[pos - 1] + v[pos]);
  if (p1 == 1 && p2 == 1) {
    long long tmp = v[pos - 1] - v[pos];
    if (tmp > 0)
      side[cnt].val = (x[pos] - x[pos - 1]) * qpow(tmp, mod - 2) % mod,
      side[cnt].t = (x[pos] - x[pos - 1]) * 1.0 / tmp;
    else
      side[cnt].val = INF, side[cnt].t = 1e20;
  }
}
inline void push_up(long long x) {
  tree[x] = mul(tree[x << 1], tree[x << 1 | 1]);
}
inline void build(long long l, long long r, long long x) {
  if (l == r) {
    tree[x].a[0][0] = tree[x].a[1][0] = (1 - p[l] + mod) % mod;
    tree[x].a[0][1] = tree[x].a[1][1] = p[l];
    return;
  }
  long long mid = l + r >> 1;
  build(l, mid, x << 1), build(mid + 1, r, x << 1 | 1);
  push_up(x);
  return;
}
inline void update(long long u, long long p1, long long p2, long long l,
                   long long r, long long x) {
  if (l == r) {
    tree[x].a[p1][p2] = 0;
    return;
  }
  long long mid = l + r >> 1;
  if (u <= mid)
    update(u, p1, p2, l, mid, x << 1);
  else
    update(u, p1, p2, mid + 1, r, x << 1 | 1);
  push_up(x);
  return;
}
inline mat query(long long ql, long long qr, long long l, long long r,
                 long long x) {
  if (ql > qr) {
    mat res;
    res.a[0][0] = res.a[1][1] = 1;
    return res;
  }
  if (ql <= l && qr >= r) return tree[x];
  long long mid = l + r >> 1;
  mat res;
  res.a[0][0] = res.a[1][1] = 1;
  if (ql <= mid) res = mul(res, query(ql, qr, l, mid, x << 1));
  if (qr > mid) res = mul(res, query(ql, qr, mid + 1, r, x << 1 | 1));
  return res;
}
signed main() {
  n = read();
  for (long long i = 1; i <= n; i++)
    x[i] = read(), v[i] = read(), p[i] = read() * qpow(100ll, mod - 2) % mod;
  build(1, n, 1);
  for (long long i = 2; i <= n; i++)
    for (long long j = 0; j <= 1; j++)
      for (long long k = 0; k <= 1; k++) insert(i, j, k);
  sort(side + 1, side + cnt + 1, cmp1);
  for (long long i = 1; i <= cnt; i++) {
    if (side[i].val == INF) break;
    mat trans;
    trans.a[side[i].p1][side[i].p2] =
        (side[i].p2 ? p[side[i].pos] : (1 - p[side[i].pos] + mod) % mod);
    trans = mul(query(1, side[i].pos - 1, 1, n, 1), trans);
    trans = mul(trans, query(side[i].pos + 1, n, 1, n, 1));
    ans += (trans.a[0][0] + trans.a[0][1]) * side[i].val % mod;
    ans %= mod;
    update(side[i].pos, side[i].p1, side[i].p2, 1, n, 1);
  }
  printf("%lld\n", ans);
  return 0;
}
