#include <bits/stdc++.h>
using namespace std;
inline char nc() {
  static char buf[100000], *p1 = buf, *p2 = buf;
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
inline int in() {
  int x = 0, f = 1;
  char ch = nc();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = nc();
  }
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - 48, ch = nc();
  return x * f;
}
const int N = 1e5 + 10, mod = 998244353;
int n, x[N], v[N], p[N][2], p0[N], s[N];
int qpow(int a, int b) {
  int c = 1;
  while (b) {
    if (b & 1) c = 1ll * c * a % mod;
    a = 1ll * a * a % mod;
    b >>= 1;
  }
  return c;
}
long long ans;
struct seg {
  int s[2][2];
} tr[N * 4], now, an, bn;
seg mul(seg A, seg B) {
  seg C;
  C.s[0][0] = C.s[0][1] = C.s[1][0] = C.s[1][1] = 0;
  for (int i = 0; i < 2; ++i)
    for (int j = 0; j < 2; ++j)
      for (int k = 0; k < 2; ++k)
        (C.s[i][j] += 1ll * A.s[i][k] * B.s[k][j] % mod) %= mod;
  return C;
}
void build(int o, int l, int r) {
  if (l == r) {
    tr[o].s[0][0] = tr[o].s[1][0] = p[l][0];
    tr[o].s[0][1] = tr[o].s[1][1] = p[l][1];
    return;
  }
  int mid = (l + r) >> 1;
  build((o << 1), l, mid);
  build((o << 1 | 1), mid + 1, r);
  tr[o] = mul(tr[(o << 1)], tr[(o << 1 | 1)]);
}
void solve(int o, int l, int r, int x, int op) {
  if (l == r) {
    if (op == 3) {
      tr[o] = now;
      return;
    }
    now = tr[o];
    tr[o].s[0][0] = tr[o].s[0][1] = tr[o].s[1][0] = tr[o].s[1][1] = 0;
    if (op == 0)
      tr[o].s[1][0] = p[l][0];
    else if (op == 1)
      tr[o].s[0][0] = p[l][0];
    else if (op == 2)
      tr[o].s[1][1] = p[l][1];
    return;
  }
  int mid = (l + r) >> 1;
  if (x <= mid)
    solve((o << 1), l, mid, x, op);
  else
    solve((o << 1 | 1), mid + 1, r, x, op);
  tr[o] = mul(tr[(o << 1)], tr[(o << 1 | 1)]);
}
void upd(int o, int l, int r, int x, int op) {
  if (l == r) {
    if (op == 0)
      tr[o].s[1][0] = 0;
    else if (op == 1)
      tr[o].s[0][0] = 0;
    else if (op == 2)
      tr[o].s[1][1] = 0;
    return;
  }
  int mid = (l + r) >> 1;
  if (x <= mid)
    upd((o << 1), l, mid, x, op);
  else
    upd((o << 1 | 1), mid + 1, r, x, op);
  tr[o] = mul(tr[(o << 1)], tr[(o << 1 | 1)]);
}
struct node {
  int s, v, x, id;
  bool operator<(const node B) const { return 1ll * s * B.v < 1ll * B.s * v; }
} t[N * 3];
int m;
int main() {
  n = in();
  if (n == 1) {
    printf("0\n");
    return 0;
  }
  for (int i = 1; i <= n; ++i) x[i] = in(), v[i] = in(), p0[i - 1] = in();
  for (int i = 0; i < n; ++i) {
    p[i][1] = 1ll * p0[i] * qpow(100, mod - 2) % mod;
    p[i][0] = 1ll * (100 - p0[i]) * qpow(100, mod - 2) % mod;
  }
  an.s[0][0] = p[0][0];
  an.s[0][1] = p[0][1];
  for (int i = 1; i < n; ++i) {
    s[i] = x[i + 1] - x[i];
    t[++m] = (node){s[i], v[i + 1] + v[i], i, 0};
    if (v[i + 1] > v[i]) t[++m] = (node){s[i], v[i + 1] - v[i], i, 1};
    if (v[i + 1] < v[i]) t[++m] = (node){s[i], v[i] - v[i + 1], i, 2};
  }
  build(1, 1, n - 1);
  sort(t + 1, t + 1 + m);
  for (int i = 1; i <= m; ++i) {
    solve(1, 1, n - 1, t[i].x, t[i].id);
    bn = mul(an, tr[1]);
    ans += 1ll * t[i].s * qpow(t[i].v, mod - 2) % mod *
           (bn.s[0][0] + bn.s[0][1]) % mod;
    ans %= mod;
    solve(1, 1, n - 1, t[i].x, 3);
    upd(1, 1, n - 1, t[i].x, t[i].id);
  }
  printf("%lld\n", ans);
  return 0;
}
