#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5, mo = 998244353, V = 21e5;
int n, x[N], v[N], p[N], inv[V], i, j, k, ans;
struct mat {
  int a[2][2];
  inline mat operator*(const mat& rhs) {
    static mat ans;
    memset(ans.a, 0, sizeof ans.a);
    for (int i = 0; i < 2; ++i)
      for (int j = 0; j < 2; ++j)
        for (int k = 0; k < 2; ++k)
          ans.a[i][k] = (ans.a[i][k] + 1ll * a[i][j] * rhs.a[j][k]) % mo;
    return ans;
  }
} aa[N], T[N << 2];
void build(int i, int l, int r) {
  if (l == r) {
    T[i] = aa[l];
    return;
  }
  int m = l + r >> 1;
  build(i << 1, l, m);
  build(i << 1 | 1, m + 1, r);
  T[i] = T[i << 1] * T[i << 1 | 1];
}
struct A {
  int fz, fm, *p, i;
  bool operator<(const A& rhs) const {
    return 1ll * fz * rhs.fm < 1ll * rhs.fz * fm;
  }
} a[N * 3];
int xb;
inline int getp() {
  return (1ll * p[1] * (T[1].a[1][0] + T[1].a[1][1]) +
          1ll * (100 - p[1]) * (T[1].a[0][0] + T[1].a[0][1])) %
         mo * inv[100] % mo;
}
void mdy(int i, int l, int r, int k) {
  if (l == r) {
    T[i] = aa[l];
    return;
  }
  int m = l + r >> 1;
  if (k <= m)
    mdy(i << 1, l, m, k);
  else
    mdy(i << 1 | 1, m + 1, r, k);
  T[i] = T[i << 1] * T[i << 1 | 1];
}
int main() {
  for (i = 1; i < V; ++i)
    inv[i] = i == 1 ? 1 : 1ll * (mo - mo / i) * inv[mo % i] % mo;
  scanf("%d", &n);
  for (i = 1; i <= n; ++i) scanf("%d%d%d", x + i, v + i, p + i);
  if (n < 2) {
    puts("0");
    return 0;
  }
  for (i = 1; i < n; ++i) {
    for (j = 0; j < 2; ++j)
      for (k = 0; k < 2; ++k)
        aa[i].a[j][k] = 1ll * inv[100] * (k ? p[i + 1] : 100 - p[i + 1]) % mo;
    int d = x[i + 1] - x[i];
    a[++xb] = {d, v[i + 1] + v[i], &aa[i].a[1][0], i};
    if (v[i] < v[i + 1]) a[++xb] = {d, v[i + 1] - v[i], &aa[i].a[0][0], i};
    if (v[i] > v[i + 1]) a[++xb] = {d, v[i] - v[i + 1], &aa[i].a[1][1], i};
  }
  build(1, 1, n - 1);
  sort(a + 1, a + xb + 1);
  for (i = 1; i <= xb; ++i) {
    int ori = getp();
    *a[i].p = 0;
    mdy(1, 1, n - 1, a[i].i);
    ans = (ans + 1ll * inv[a[i].fm] * a[i].fz % mo * (ori + mo - getp())) % mo;
  }
  printf("%d\n", ans);
  return 0;
}
