#include <bits/stdc++.h>
using namespace std;
const int N = 400400;
const int mod = 998244353;
int n, cnt;
long long x[N], p[N], v[N], ans;
inline long long qpow(long long x, long long y, long long ans = 1) {
  for (; y; y >>= 1, x = x * x % mod)
    if (y & 1) ans = ans * x % mod;
  return ans;
}
struct Matrix {
  long long a[2][2];
  friend Matrix operator*(Matrix a, Matrix b) {
    Matrix c;
    c.a[0][0] = (a.a[0][0] * b.a[0][0] + a.a[0][1] * b.a[1][0]) % mod;
    c.a[1][0] = (a.a[1][0] * b.a[0][0] + a.a[1][1] * b.a[1][0]) % mod;
    c.a[0][1] = (a.a[0][0] * b.a[0][1] + a.a[0][1] * b.a[1][1]) % mod;
    c.a[1][1] = (a.a[1][0] * b.a[0][1] + a.a[1][1] * b.a[1][1]) % mod;
    return c;
  }
} a[N], c[N];
struct Bang {
  int x, y, ox, oy;
  long long len, v;
  friend bool operator<(Bang a, Bang b) { return a.len * b.v < b.len * a.v; }
} b[N];
void modify(int x, int l, int r, int p) {
  if (l == r) return a[x] = c[l], void();
  int mid = l + r >> 1;
  if (p <= mid) modify(x << 1, l, mid, p);
  if (p > mid) modify(x << 1 | 1, mid + 1, r, p);
  a[x] = a[x << 1] * a[x << 1 | 1];
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> x[i] >> v[i] >> p[i];
  for (int i = 1; i < n; ++i) {
    b[++cnt].x = i, b[cnt].y = i + 1;
    b[cnt].ox = 1;
    b[cnt].oy = 0;
    b[cnt].len = x[i + 1] - x[i];
    b[cnt].v = v[i] + v[i + 1];
    if (v[i] > v[i + 1])
      b[++cnt].x = i, b[cnt].y = i + 1, b[cnt].ox = 1, b[cnt].oy = 1,
      b[cnt].len = x[i + 1] - x[i], b[cnt].v = v[i] - v[i + 1];
    else if (v[i] < v[i + 1])
      b[++cnt].x = i, b[cnt].y = i + 1, b[cnt].ox = 0, b[cnt].oy = 0,
      b[cnt].len = x[i + 1] - x[i], b[cnt].v = v[i + 1] - v[i];
  }
  c[1].a[0][0] = 100 - p[1];
  c[1].a[0][1] = p[1];
  modify(1, 1, n, 1);
  for (int i = 2; i <= n; ++i) {
    c[i].a[1][1] = p[i];
    c[i].a[0][1] = p[i];
    c[i].a[0][0] = 100 - p[i];
    c[i].a[1][0] = 100 - p[i];
    modify(1, 1, n, i);
  }
  sort(b + 1, b + cnt + 1);
  for (int i = 1; i <= cnt; ++i) {
    long long tmp = qpow(b[i].v, mod - 2) * b[i].len % mod;
    Matrix ooo = c[b[i].y];
    c[b[i].y].a[!b[i].ox][b[i].oy] = 0;
    c[b[i].y].a[!b[i].ox][!b[i].oy] = 0;
    c[b[i].y].a[b[i].ox][!b[i].oy] = 0;
    modify(1, 1, n, b[i].y);
    (ans += tmp * (a[1].a[0][0] + a[1].a[0][1])) %= mod;
    c[b[i].y] = ooo;
    c[b[i].y].a[b[i].ox][b[i].oy] = 0;
    modify(1, 1, n, b[i].y);
  }
  printf("%lld\n", (ans * qpow(100, n * (mod - 2ll)) % mod + mod) % mod);
  return 0;
}
