#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
struct Matrix {
  long long n, m, a[2][2];
} t[100002 * 4], f[100002];
struct query {
  long long s, v, op1, op2, x;
} q[100002 * 4];
long long n, m, i, j, k, x[100002], v[100002], p[100002], ans;
long long read() {
  char c = getchar();
  long long w = 0, f = 1;
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c <= '9' && c >= '0') {
    w = w * 10 + c - '0';
    c = getchar();
  }
  return w * f;
}
Matrix operator*(Matrix a, Matrix b) {
  Matrix c;
  c.n = a.n;
  c.m = b.m;
  memset(c.a, 0, sizeof(c.a));
  for (long long i = 0; i <= a.n; i++) {
    for (long long j = 0; j <= b.m; j++) {
      for (long long k = 0; k <= a.m; k++)
        c.a[i][j] = (c.a[i][j] + a.a[i][k] * b.a[k][j] % mod) % mod;
    }
  }
  return c;
}
long long poww(long long a, long long b) {
  long long ans = 1, base = a;
  while (b) {
    if (b & 1) ans = ans * base % mod;
    base = base * base % mod;
    b >>= 1;
  }
  return ans;
}
long long my_comp(const query &a, const query &b) {
  return a.s * b.v < b.s * a.v;
}
void update(long long p) { t[p] = t[p * 2] * t[p * 2 + 1]; }
void build(long long p, long long l, long long r) {
  if (l == r) {
    t[p] = f[l];
    return;
  }
  long long mid = (l + r) / 2;
  build(p * 2, l, mid);
  build(p * 2 + 1, mid + 1, r);
  update(p);
}
void change(long long p, long long l, long long r, long long x) {
  if (l == r) {
    t[p] = f[l];
    return;
  }
  long long mid = (l + r) / 2;
  if (x <= mid)
    change(p * 2, l, mid, x);
  else
    change(p * 2 + 1, mid + 1, r, x);
  update(p);
}
signed main() {
  n = read();
  for (i = 1; i <= n; i++) {
    x[i] = read();
    v[i] = read();
    p[i] = read();
    p[i] = p[i] * poww(100, mod - 2) % mod;
  }
  for (i = 1; i < n; i++) {
    q[++m] = (query){x[i + 1] - x[i], v[i] + v[i + 1], 1, 0, i + 1};
    if (v[i + 1] > v[i])
      q[++m] = (query){x[i + 1] - x[i], v[i + 1] - v[i], 0, 0, i + 1};
    if (v[i] > v[i + 1])
      q[++m] = (query){x[i + 1] - x[i], v[i] - v[i + 1], 1, 1, i + 1};
  }
  sort(q + 1, q + m + 1, my_comp);
  for (i = 1; i <= n; i++) {
    f[i].n = f[i].m = 1;
    f[i].a[0][0] = f[i].a[1][0] = (mod - p[i] + 1) % mod;
    f[i].a[0][1] = f[i].a[1][1] = p[i];
  }
  build(1, 1, n);
  for (i = 1; i <= m; i++) {
    Matrix tmp = f[q[i].x];
    for (j = 0; j <= 1; j++) {
      for (k = 0; k <= 1; k++) {
        if (j != q[i].op1 || k != q[i].op2) f[q[i].x].a[j][k] = 0;
      }
    }
    change(1, 1, n, q[i].x);
    f[q[i].x] = tmp;
    long long res = q[i].s * poww(q[i].v, mod - 2) % mod;
    ans = (ans + res * (t[1].a[0][0] + t[1].a[0][1]) % mod) % mod;
    f[q[i].x].a[q[i].op1][q[i].op2] = 0;
    change(1, 1, n, q[i].x);
  }
  printf("%lld\n", ans);
  return 0;
}
