#include <bits/stdc++.h>
using namespace std;
long long n, inv100, num;
bool tag[100005][2][2];
const long long mod = 998244353;
long long x[100005], vi[100005], p[100005][2], ans;
struct SL_tree {
  long long t[100005 << 2][2][2];
  void push_up(int l, int r, int rt) {
    t[rt][0][0] = t[rt][1][0] = t[rt][0][1] = t[rt][1][1] = 0;
    for (int i = 0; i <= 1; i++) {
      for (int j = 0; j <= 1; j++) {
        for (int x = 0; x <= 1; x++) {
          for (int y = 0; y <= 1; y++) {
            t[rt][i][y] += (t[rt << 1][i][j] * t[rt << 1 | 1][x][y] % mod) *
                           (!tag[((l + r) >> 1)][j][x]) % mod;
            t[rt][i][y] %= mod;
          }
        }
      }
    }
  }
  void change(int pos, int l = 1, int r = n, int rt = 1) {
    if (l == r) return;
    if (pos <= ((l + r) >> 1))
      change(pos, l, ((l + r) >> 1), rt << 1);
    else
      change(pos, ((l + r) >> 1) + 1, r, rt << 1 | 1);
    if (l <= pos && pos < r) push_up(l, r, rt);
  }
  void build(int l = 1, int r = n, int rt = 1) {
    if (l == r) {
      t[rt][1][1] = p[l][1], t[rt][0][0] = p[l][0];
      return;
    }
    build(l, ((l + r) >> 1), rt << 1);
    build(((l + r) >> 1) + 1, r, rt << 1 | 1);
    push_up(l, r, rt);
  }
} tree;
long long ksm(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y & 1) res = res * x % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return res;
}
struct node {
  int v, u, dv, du;
  double ti;
  long long val;
} e[300005];
inline bool cmp(node a, node b) { return a.ti < b.ti; }
int main() {
  inv100 = ksm(100, mod - 2);
  scanf("%lld", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld %lld %lld", &x[i], &vi[i], &p[i][1]),
        p[i][1] = p[i][1] * inv100 % mod, p[i][0] = (1 + mod - p[i][1]) % mod;
  }
  tree.build();
  for (int u = 1, v = 2; u < n; u++, v++) {
    if (vi[u] > vi[v]) {
      e[++num].u = u, e[num].v = v, e[num].du = 1, e[num].dv = 1;
      e[num].ti = 1.0 * (x[v] - x[u]) / (vi[u] - vi[v]);
      e[num].val = 1ll * (x[v] - x[u]) * ksm(vi[u] - vi[v], mod - 2) % mod;
    } else if (vi[u] < vi[v]) {
      e[++num].u = u, e[num].v = v, e[num].du = 0, e[num].dv = 0;
      e[num].ti = 1.0 * (x[v] - x[u]) / (vi[v] - vi[u]);
      e[num].val = 1ll * (x[v] - x[u]) * ksm(vi[v] - vi[u], mod - 2) % mod;
    }
    e[++num].u = u, e[num].v = v, e[num].du = 1, e[num].dv = 0;
    e[num].ti = 1.0 * (x[v] - x[u]) / (vi[v] + vi[u]);
    e[num].val = 1ll * (x[v] - x[u]) * ksm(vi[v] + vi[u], mod - 2) % mod;
  }
  sort(e + 1, e + 1 + num, cmp);
  int u, du, dv;
  long long lst = 1, pi;
  for (int i = 1; i <= num; i++) {
    u = e[i].u, du = e[i].du, dv = e[i].dv;
    tag[u][du][dv] = 1;
    tree.change(u);
    pi = (tree.t[1][1][1] + tree.t[1][1][0] + tree.t[1][0][1] +
          tree.t[1][0][0]) %
         mod;
    ans += ((lst - pi + mod) % mod) * e[i].val % mod;
    ans %= mod;
    lst = pi;
  }
  cout << ans;
}
