#include <bits/stdc++.h>
using namespace std;
template <class T>
void cmax(T &a, T b) {
  a = (a > b ? a : b);
}
template <class T>
void cmin(T &a, T b) {
  a = (a > b ? b : a);
}
const long long maxn = 140000, kcz = 998244353;
long long ksm(long long ds, long long zs = kcz - 2, long long mod = kcz) {
  long long res = 1;
  for (; zs; zs >>= 1, ds = ds * ds % mod)
    if (zs & 1) res = res * ds % mod;
  return res;
}
const long long i100 = ksm(100);
long long lim[maxn][2][2], n;
long long p[maxn][2];
struct SEG {
  long long tr[maxn << 1][2][2];
  void up(long long now, long long l, long long r) {
    memset(tr[now], 0, sizeof(tr[now]));
    long long i, j, k, t;
    for (i = (0); i <= (1); ++i)
      for (j = (0); j <= (1); ++j)
        for (k = (0); k <= (1); ++k)
          for (t = (0); t <= (1); ++t)
            if (!lim[((l + r) >> 1)][k][t])
              (tr[now][i][j] +=
               tr[(now << 1)][i][k] * tr[(now << 1 | 1)][t][j]) %= kcz;
  }
  void build(long long now, long long l, long long r) {
    if (l == r) {
      tr[now][0][0] = p[l][0];
      tr[now][1][1] = p[l][1];
      return;
    }
    build((now << 1), l, ((l + r) >> 1));
    build((now << 1 | 1), ((l + r) >> 1) + 1, r);
    up(now, l, r);
  }
  void up(long long now, long long l, long long r, long long x) {
    if (l == r) return;
    if (((l + r) >> 1) >= x)
      up((now << 1), l, ((l + r) >> 1), x);
    else
      up((now << 1 | 1), ((l + r) >> 1) + 1, r, x);
    up(now, l, r);
  }
} seg;
struct data {
  long long id, l, r, t;
  double p;
  data() {
    id = l = r = t = 0;
    p = 0;
  }
  data(long long a, long long b, long long c, long long d, double e) {
    id = a;
    l = b;
    r = c;
    t = d;
    p = e;
  }
  bool operator<(const data &b) const { return p < b.p; }
} a[maxn << 1];
int main() {
  scanf("%lld", &n);
  long long i, lx, lv, cnt = 0;
  for (i = (1); i <= (n); ++i) {
    long long X, V, P;
    scanf("%lld%lld%lld", &X, &V, &P);
    if (i > 1) {
      a[++cnt] = data(i - 1, 1, 0, (X - lx) * ksm(V + lv) % kcz,
                      (double)(X - lx) / (V + lv));
      if (V > lv)
        a[++cnt] = data(i - 1, 0, 0, (X - lx) * ksm(V - lv) % kcz,
                        (double)(X - lx) / (V - lv));
      else if (lv > V)
        a[++cnt] = data(i - 1, 1, 1, (X - lx) * ksm(lv - V) % kcz,
                        (double)(X - lx) / (lv - V));
    }
    p[i][0] = (100 - P) * i100 % kcz;
    p[i][1] = P * i100 % kcz;
    lv = V;
    lx = X;
  }
  seg.build(1, 1, n);
  sort(a + 1, a + cnt + 1);
  long long ans = 0, last = 1, now, j, k;
  for (i = (1); i <= (cnt); ++i) {
    lim[a[i].id][a[i].l][a[i].r] = 1;
    seg.up(1, 1, n, a[i].id);
    now = 0;
    for (j = (0); j <= (1); ++j)
      for (k = (0); k <= (1); ++k) (now += seg.tr[1][j][k]) %= kcz;
    ans += a[i].t * (last - now + kcz) % kcz;
    last = now;
  }
  printf("%lld", (ans % kcz + kcz) % kcz);
  return 0;
}
