#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int sum = 0, f = 1;
  char ch = getchar();
  while (ch != '-' && (ch < '0' || ch > '9')) ch = getchar();
  if (ch == '-') ch = getchar(), f = -1;
  while (ch <= '9' && ch >= '0') sum = sum * 10 + ch - '0', ch = getchar();
  return sum * f;
}
int n;
struct op {
  int x, v, p;
  op(int x_ = 0, int v_ = 0, int p_ = 0) : x(x_), v(v_), p(p_) {}
} st[100010];
const int mod = 998244353;
int ksm(int a, int b) {
  int sum = 1;
  while (b) {
    if (b & 1) sum = 1ll * sum * a % mod;
    a = 1ll * a * a % mod;
    b >>= 1;
  }
  return sum;
}
struct Pair {
  double val;
  int Val;
  int i, l, r;
  Pair(double a = 0, int b = 0, int c = 0, int d = 0, int e = 0)
      : val(a), Val(b), i(c), l(d), r(e) {}
  bool operator<(Pair s) const { return val < s.val; }
} s[100010 << 1];
int cnt;
struct juzhen {
  int x[2][2];
  juzhen() { memset(x, 0, sizeof(x)); }
  juzhen operator*(juzhen s) const {
    juzhen t;
    for (int i = 0; i < 2; i++)
      for (int j = 0; j < 2; j++)
        for (int k = 0; k < 2; k++)
          t.x[i][j] = (t.x[i][j] + 1ll * x[i][k] * s.x[k][j] % mod) % mod;
    return t;
  }
} Sg[100010];
struct seg_tree {
  juzhen Gai[100010 << 2];
  void up(int now) { Gai[now] = Gai[now << 1] * Gai[now << 1 | 1]; }
  void build(int now, int l, int r) {
    if (l == r) {
      Gai[now] = Sg[l];
      return;
    }
    int mid = l + r >> 1;
    build(now << 1, l, mid);
    build(now << 1 | 1, mid + 1, r);
    up(now);
  }
  void modify(int now, int l, int r, int t, juzhen s) {
    if (l == r) {
      return void(Gai[now] = s);
    }
    int mid = l + r >> 1;
    if (t <= mid)
      modify(now << 1, l, mid, t, s);
    else
      modify(now << 1 | 1, mid + 1, r, t, s);
    up(now);
  }
} S;
int main() {
  n = read();
  for (int i = 1; i <= n; i++) {
    int x = read(), v = read(), p = read();
    p = 1ll * p * ksm(100, mod - 2) % mod;
    st[i] = op(x, v, p);
    if (i >= 2) {
      Sg[i].x[0][0] = Sg[i].x[1][0] = p;
      Sg[i].x[0][1] = Sg[i].x[1][1] = (mod + 1 - p) % mod;
    }
  }
  Sg[1].x[0][0] = st[1].p, Sg[1].x[0][1] = (mod + 1 - st[1].p) % mod;
  S.build(1, 1, n);
  for (int i = 2; i <= n; i++) {
    int shang = (st[i].x - st[i - 1].x);
    int xia = (st[i - 1].v + st[i].v);
    s[++cnt] = Pair((double)shang / xia, 1ll * shang * ksm(xia, mod - 2) % mod,
                    i - 1, 1, 0);
    int mmax = max(st[i - 1].v, st[i].v);
    int mmin = min(st[i - 1].v, st[i].v);
    mmax -= mmin;
    if (mmax) {
      int ty;
      if (st[i - 1].v > st[i].v)
        ty = 1;
      else
        ty = 0;
      s[++cnt] = Pair((double)shang / mmax,
                      1ll * shang * ksm(mmax, mod - 2) % mod, i - 1, ty, ty);
    }
  }
  sort(s + 1, s + 1 + cnt);
  int ans = 0;
  for (int i = 1; i <= cnt; i++) {
    int id = s[i].i;
    juzhen R;
    R.x[s[i].l ^ 1][s[i].r ^ 1] =
        s[i].r ? st[id + 1].p : (mod + 1 - st[id + 1].p) % mod;
    S.modify(1, 1, n, id + 1, R);
    juzhen GGG = S.Gai[1];
    int sum = (GGG.x[0][0] + GGG.x[0][1]) % mod;
    ans = (ans + 1ll * s[i].Val * sum % mod) % mod;
    Sg[id + 1].x[s[i].l ^ 1][s[i].r ^ 1] = 0;
    S.modify(1, 1, n, id + 1, Sg[id + 1]);
  }
  cout << ans;
  return 0;
}
