#include <bits/stdc++.h>
using namespace std;
const int MAXN = 110000;
const int P = 998244353;
const int INV100 = 828542813;
void exgcd(int a, int b, int& x, int& y) {
  if (b == 0)
    x = 1, y = 0;
  else
    exgcd(b, a % b, y, x), y -= a / b * x;
}
inline int inv(int a) {
  int x, y;
  exgcd(a, P, x, y);
  return (x % P + P) % P;
}
struct Matrix {
  int n, m, a[3][3];
  Matrix() {}
  Matrix(int r, int c) : n(r), m(c) { memset(a, 0, sizeof a); }
  Matrix operator*(const Matrix& b) const {
    Matrix c(n, b.m);
    for (int i = 0; i < n; i++)
      for (int k = 0; k < m; k++)
        for (int j = 0; j < b.m; j++)
          c.a[i][j] = (c.a[i][j] + 1ll * a[i][k] * b.a[k][j]) % P;
    return c;
  }
} w[MAXN];
struct SegmenTree {
  struct Node {
    int l, r;
    Matrix val;
  } tr[4 * MAXN];
  void pushup(int o) { tr[o].val = tr[(o << 1)].val * tr[(o << 1 | 1)].val; }
  void build(int o, int l, int r) {
    tr[o].l = l;
    tr[o].r = r;
    if (l == r) {
      tr[o].val = w[l];
      return;
    }
    int mid = l + r >> 1;
    build((o << 1), l, mid);
    build((o << 1 | 1), mid + 1, r);
    pushup(o);
  }
  void update(int o, int p) {
    if (tr[o].l == tr[o].r) {
      tr[o].val = w[p];
      return;
    }
    int mid = tr[o].l + tr[o].r >> 1;
    if (p <= mid)
      update((o << 1), p);
    else
      update((o << 1 | 1), p);
    pushup(o);
  }
} st;
struct Pipe {
  int x, v, p;
  Pipe() {}
  Pipe(int a, int b, int c) : x(a), v(b), p(c) {}
} a[MAXN];
struct Movement {
  int id, d0, d1;
  Movement() {}
  Movement(int a, int b, int c) : id(a), d0(b), d1(c) {}
  bool operator<(const Movement& rhs) const {
    return 1ll * (a[id].x - a[id - 1].x) *
               (rhs.d0 * a[rhs.id - 1].v - rhs.d1 * a[rhs.id].v) <
           1ll * (a[rhs.id].x - a[rhs.id - 1].x) *
               (d0 * a[id - 1].v - d1 * a[id].v);
  }
  void set(bool k) {
    if (d0 == 1)
      if (d1 == 1)
        w[id].a[0][0] = k * a[id].p;
      else
        w[id].a[0][1] = k * (1 - a[id].p + P) % P;
    else if (d1 == 1)
      w[id].a[1][0] = k * a[id].p;
    else
      w[id].a[1][1] = k * (1 - a[id].p + P) % P;
  }
  int meettime() {
    return 1ll * (a[id].x - a[id - 1].x) *
           inv(d0 * a[id - 1].v - d1 * a[id].v) % P;
  }
} b[4 * MAXN];
int main() {
  int n, m = 0;
  scanf("%d", &n);
  a[0] = Pipe(-(1E9 + 233), 1E6 + 233, 0);
  for (int i = 1; i <= n; i++) {
    int x, v, p;
    scanf("%d%d%d", &x, &v, &p);
    a[i] = Pipe(x, v, 1ll * p * INV100 % P);
    b[++m] = Movement(i, 1, -1);
    if (a[i].v < a[i - 1].v)
      b[++m] = Movement(i, 1, 1);
    else if (a[i].v > a[i - 1].v)
      b[++m] = Movement(i, -1, -1);
  }
  for (int i = 1; i <= n; i++) {
    w[i] = Matrix(2, 2);
    w[i].a[0][0] = w[i].a[1][0] = a[i].p;
    w[i].a[0][1] = w[i].a[1][1] = (1 - a[i].p + P) % P;
  }
  st.build(1, 1, n);
  sort(b + 1, b + m + 1);
  int ans = 0;
  for (int i = 1; i <= m; i++) {
    Matrix t = w[b[i].id];
    w[b[i].id] = Matrix(2, 2);
    b[i].set(1);
    st.update(1, b[i].id);
    ans = (ans + 1ll * b[i].meettime() *
                     (st.tr[1].val.a[1][0] + st.tr[1].val.a[1][1])) %
          P;
    w[b[i].id] = t;
    b[i].set(0);
    st.update(1, b[i].id);
  }
  printf("%d\n", ans);
  return 0;
}
