#include <bits/stdc++.h>
using namespace std;
long long n;
const long long N = 1e5 + 100;
long long x[N], v1[N], p[N][2];
const long long mod = 998244353;
long long power(long long a, long long b) {
  if (b == 0) {
    return 1;
  }
  if (b % 2 == 0) {
    long long t = power(a, b / 2);
    return t * t % mod;
  }
  return a * power(a, b - 1) % mod;
}
struct node {
  long long id;
  bool d1, d2;
  long long x, y;
} cra[N << 1];
bool cmp(node a, node b) { return a.x * b.y < b.x * a.y; }
struct matrix {
  long long a[2][2];
  matrix operator*(const matrix x1) const {
    matrix res;
    for (long long i = 0; i < 2; i++) {
      for (long long j = 0; j < 2; j++) {
        res.a[i][j] = 0;
        for (long long k = 0; k < 2; k++) {
          res.a[i][j] = (res.a[i][j] + a[i][k] * x1.a[k][j]) % mod;
        }
      }
    }
    return res;
  }
} lim[N];
matrix Tree[N << 2];
void build(long long v, long long l, long long r) {
  if (l == r) {
    Tree[v] = lim[l];
    return;
  }
  long long m = (r + l) / 2;
  build(v * 2, l, m);
  build(v * 2 + 1, m + 1, r);
  Tree[v] = Tree[v * 2] * Tree[v * 2 + 1];
}
void update(long long v, long long l, long long r, long long idx, matrix val) {
  if (l == r) {
    Tree[v] = val;
    return;
  }
  long long m = (r + l) / 2;
  if (idx <= m) {
    update(v * 2, l, m, idx, val);
  } else {
    update(v * 2 + 1, m + 1, r, idx, val);
  }
  Tree[v] = Tree[v * 2] * Tree[v * 2 + 1];
}
signed main() {
  cin >> n;
  if (n == 1) {
    cout << 0;
    return 0;
  }
  long long tot = 0;
  long long inv = power(100, mod - 2);
  for (long long i = 1; i <= n; i++) {
    cin >> x[i] >> v1[i] >> p[i][1];
    p[i][1] = p[i][1] * inv % mod;
    p[i][0] = (1 - p[i][1] + mod) % mod;
    if (i > 1) {
      cra[++tot] = (node){i, 1, 0, x[i] - x[i - 1], v1[i] + v1[i - 1]};
      if (v1[i - 1] > v1[i]) {
        cra[++tot] = (node){i, 1, 1, x[i] - x[i - 1], v1[i - 1] - v1[i]};
      }
      if (v1[i] > v1[i - 1]) {
        cra[++tot] = (node){i, 0, 0, x[i] - x[i - 1], v1[i] - v1[i - 1]};
      }
    }
  }
  sort(cra + 1, cra + tot + 1, cmp);
  lim[1].a[0][0] = p[1][0];
  lim[1].a[0][1] = p[1][1];
  lim[1].a[1][0] = lim[1].a[1][1] = 0;
  for (long long i = 2; i <= n; i++) {
    lim[i].a[0][0] = lim[i].a[1][0] = p[i][0];
    lim[i].a[0][1] = lim[i].a[1][1] = p[i][1];
  }
  long long ans = 0;
  build(1, 1, n);
  long long last = 1;
  for (long long i = 1; i <= tot; i++) {
    long long id = cra[i].id;
    long long tim = cra[i].x * power(cra[i].y, mod - 2) % mod;
    lim[id].a[cra[i].d1][cra[i].d2] = 0;
    update(1, 1, n, id, lim[id]);
    long long p = (Tree[1].a[0][0] + Tree[1].a[0][1]) % mod;
    ans = (ans + tim * (last - p + mod)) % mod;
    last = p;
  }
  cout << ans;
  return 0;
}
