#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1, MOD = 998244353;
int lim[N][2][2], p[N << 2][2][2], psb[N][2];
inline int qpow(int base, int expo) {
  int ret = 1;
  while (expo) {
    if (expo & 1) ret = 1ll * ret * base % MOD;
    base = 1ll * base * base % MOD;
    expo >>= 1;
  }
  return ret;
}
inline void up(int now, int mid) {
  int i, j, k, l;
  for (i = 0; i < 2; i++) {
    for (j = 0; j < 2; j++) {
      p[now][i][j] = 0;
      for (k = 0; k < 2; k++)
        for (l = 0; l < 2; l++)
          if (!lim[mid][k][l])
            p[now][i][j] =
                (0ll + p[now][i][j] +
                 1ll * p[now << 1][i][k] * p[now << 1 | 1][l][j] % MOD) %
                MOD;
    }
  }
}
void build(int now, int l, int r) {
  if (l == r) {
    p[now][0][0] = psb[l][0];
    p[now][1][1] = psb[l][1];
    return;
  }
  int mid = (l + r) >> 1;
  build(now << 1, l, mid);
  build(now << 1 | 1, mid + 1, r);
  up(now, mid);
}
void update(int now, int l, int r, int qp) {
  if (l == r) return;
  int mid = (l + r) >> 1;
  if (qp <= mid)
    update(now << 1, l, mid, qp);
  else
    update(now << 1 | 1, mid + 1, r, qp);
  up(now, mid);
}
struct chase {
  int x, xp, yp;
  double tim;
  int rtim;
  chase(int x = 0, int xp = 0, int yp = 0, double tim = 0, int rtim = 0)
      : x(x), xp(xp), yp(yp), tim(tim), rtim(rtim) {}
} cs[N * 2];
int csc;
inline int cmp(chase a, chase b) { return a.tim < b.tim; }
int main() {
  int n, i, lasp, lasv, inv = qpow(100, MOD - 2);
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    int tpos, tv;
    scanf("%d%d%d", &tpos, &tv, &psb[i][1]);
    if (i > 1) {
      int dis = tpos - lasp;
      cs[++csc] = chase(i - 1, 1, 0, dis / 1.0 / (tv + lasv),
                        1ll * dis * qpow(tv + lasv, MOD - 2) % MOD);
      if (tv < lasv)
        cs[++csc] = chase(i - 1, 1, 1, dis / 1.0 / (lasv - tv),
                          1ll * dis * qpow(lasv - tv, MOD - 2) % MOD);
      else if (tv > lasv)
        cs[++csc] = chase(i - 1, 0, 0, dis / 1.0 / (tv - lasv),
                          1ll * dis * qpow(tv - lasv, MOD - 2) % MOD);
    }
    psb[i][0] = 1ll * (100 - psb[i][1]) * inv % MOD;
    psb[i][1] = 1ll * psb[i][1] * inv % MOD;
    lasp = tpos, lasv = tv;
  }
  build(1, 1, n);
  sort(cs + 1, cs + csc + 1, cmp);
  int ans = 0, lpsb = 1;
  for (i = 1; i <= csc; i++) {
    lim[cs[i].x][cs[i].xp][cs[i].yp] = 1;
    update(1, 1, n, cs[i].x);
    int tpsb = (0ll + p[1][0][0] + p[1][0][1] + p[1][1][0] + p[1][1][1]) % MOD;
    ans = (0ll + ans + 1ll * cs[i].rtim * (lpsb - tpsb + MOD) % MOD) % MOD;
    lpsb = tpsb;
  }
  printf("%d", ans);
  return 0;
}
