#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353, Iv100 = 828542813;
int n, m, X[100005], V[100005], p[100005][2], ans;
int Pow(int a, int b) {
  int s = 1;
  for (; b; b >>= 1, a = 1ll * a * a % mod) b & 1 && (s = 1ll * s * a % mod);
  return s;
}
struct node {
  int s, v, p, a, b;
  bool operator<(const node &p) const { return 1ll * s * p.v < 1ll * p.s * v; }
} q[100005 << 2];
struct Mat {
  int s[2][2];
  Mat() { memset(s, 0, sizeof s); }
  void init(int *p) { s[0][0] = s[1][0] = p[0], s[0][1] = s[1][1] = p[1]; }
  Mat operator*(const Mat &B) const {
    Mat ret;
    ret.s[0][0] = (1ll * s[0][0] * B.s[0][0] + 1ll * s[0][1] * B.s[1][0]) % mod,
    ret.s[0][1] = (1ll * s[0][0] * B.s[0][1] + 1ll * s[0][1] * B.s[1][1]) % mod,
    ret.s[1][0] = (1ll * s[1][0] * B.s[0][0] + 1ll * s[1][1] * B.s[1][0]) % mod,
    ret.s[1][1] = (1ll * s[1][0] * B.s[0][1] + 1ll * s[1][1] * B.s[1][1]) % mod;
    return ret;
  }
} M[100005], t[100005 << 2];
void build(int i, int l, int r) {
  if (l == r) return void(t[i] = M[l]);
  int mid = (l + r) >> 1;
  build(i << 1, l, mid), build(i << 1 | 1, mid + 1, r);
  t[i] = t[i << 1] * t[i << 1 | 1];
}
void ins(int i, int l, int r, int x) {
  if (l == r) return void(t[i] = M[x]);
  int mid = (l + r) >> 1;
  x <= mid ? ins(i << 1, l, mid, x) : ins(i << 1 | 1, mid + 1, r, x);
  t[i] = t[i << 1] * t[i << 1 | 1];
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    scanf("%d%d%d", &X[i], &V[i], &p[i][1]),
        p[i][1] = 1ll * p[i][1] * Iv100 % mod, p[i][0] = 1 + mod - p[i][1];
  for (int i = 1, v; i < n; i++)
    for (int a = 0; a < 2; a++)
      for (int b = 0; b < 2; b++) {
        v = !a && b    ? 0
            : !a && !b ? V[i + 1] - V[i]
            : a && b   ? V[i] - V[i + 1]
                       : V[i] + V[i + 1];
        if (v <= 0) continue;
        q[++m] = (node){X[i + 1] - X[i], v, i, a, b};
      }
  sort(q + 1, q + 1 + m);
  for (int i = 1; i <= n; i++) M[i].init(p[i]);
  build(1, 1, n);
  for (int i = 1; i <= m; i++) {
    int x = q[i].p + 1;
    Mat tmp = M[x];
    M[x] = Mat(), M[x].s[q[i].a][q[i].b] = p[x][q[i].b], ins(1, 1, n, x);
    ans = (ans + 1ll * q[i].s * Pow(q[i].v, mod - 2) % mod *
                     (t[1].s[0][0] + t[1].s[0][1])) %
          mod;
    M[x] = tmp, M[x].s[q[i].a][q[i].b] = 0, ins(1, 1, n, x);
  }
  printf("%d\n", ans);
}
