#include <bits/stdc++.h>
using namespace std;
inline int rd() {
  int x = 0;
  char c = getchar();
  bool f = 0;
  while (c < '0' && c != '-') c = getchar();
  if (c == '-') f = 1, c = getchar();
  while (c >= '0') x = (x << 3) + (x << 1) + (c ^ 48), c = getchar();
  return f ? -x : x;
}
const int SIZE = 1e5 + 100;
const int Mod = 998244353;
int Pow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = 1LL * res * a % Mod;
    b >>= 1;
    a = 1LL * a * a % Mod;
  }
  return res;
}
int n;
int x[SIZE], v[SIZE], P[SIZE];
struct Matrix {
  int a[2][2];
  void Mult(const Matrix& x1) {
    int t00 = (1LL * a[0][0] * x1.a[0][0] + 1LL * a[0][1] * x1.a[1][0]) % Mod;
    int t01 = (1LL * a[0][0] * x1.a[0][1] + 1LL * a[0][1] * x1.a[1][1]) % Mod;
    int t10 = (1LL * a[1][0] * x1.a[0][0] + 1LL * a[1][1] * x1.a[1][0]) % Mod;
    int t11 = (1LL * a[1][0] * x1.a[0][1] + 1LL * a[1][1] * x1.a[1][1]) % Mod;
    a[0][0] = t00;
    a[0][1] = t01;
    a[1][0] = t10;
    a[1][1] = t11;
  }
};
struct TreeNode {
  int L, R;
  Matrix res;
} tree[SIZE << 2];
int ans[2], tmp[2];
void Up(int p) {
  tree[p].res = tree[(p << 1)].res;
  tree[p].res.Mult(tree[(p << 1 | 1)].res);
}
void Build(int L, int R, int p) {
  tree[p].L = L, tree[p].R = R;
  if (L == R) {
    tree[p].res.a[0][0] = (1 + Mod - P[L + 1]) % Mod,
    tree[p].res.a[0][1] = P[L + 1];
    tree[p].res.a[1][0] = (1 + Mod - P[L + 1]) % Mod,
    tree[p].res.a[1][1] = P[L + 1];
    return;
  }
  int mid = (L + R) >> 1;
  Build(L, mid, (p << 1)), Build(mid + 1, R, (p << 1 | 1));
  Up(p);
}
int A, B;
void Update(int x, int p) {
  if (tree[p].L == tree[p].R) {
    tree[p].res.a[A][B] = 0;
    return;
  }
  int mid = (tree[p].L + tree[p].R) >> 1;
  if (x <= mid)
    Update(x, (p << 1));
  else
    Update(x, (p << 1 | 1));
  Up(p);
}
void Query(int L, int R, int p) {
  if (tree[p].L == L && tree[p].R == R) {
    tmp[0] = (1LL * ans[0] * tree[p].res.a[0][0] +
              1LL * ans[1] * tree[p].res.a[1][0]) %
             Mod;
    tmp[1] = (1LL * ans[0] * tree[p].res.a[0][1] +
              1LL * ans[1] * tree[p].res.a[1][1]) %
             Mod;
    ans[0] = tmp[0];
    ans[1] = tmp[1];
    return;
  }
  int mid = (tree[p].L + tree[p].R) >> 1;
  if (R <= mid)
    Query(L, R, (p << 1));
  else if (L > mid)
    Query(L, R, (p << 1 | 1));
  else
    Query(L, mid, (p << 1)), Query(mid + 1, R, (p << 1 | 1));
}
struct Node {
  int a, b;
  int id;
  int S, v;
  bool operator<(const Node& x1) const {
    return 1LL * S * x1.v < 1LL * x1.S * v;
  }
} T[SIZE << 1];
void _main() {
  n = rd();
  if (n == 1) {
    puts("0");
    return;
  }
  int inv = Pow(100, Mod - 2);
  for (register int i = 1, _n = n; i <= _n; ++i)
    x[i] = rd(), v[i] = rd(), P[i] = 1LL * rd() * inv % Mod;
  int N = 0;
  for (register int i = 1, _n = n; i < _n; ++i) {
    T[++N] = (Node){1, 0, i, (x[i + 1] - x[i]), (v[i] + v[i + 1])};
    if (v[i] > v[i + 1])
      T[++N] = (Node){1, 1, i, (x[i + 1] - x[i]), (v[i] - v[i + 1])};
    if (v[i + 1] > v[i])
      T[++N] = (Node){0, 0, i, (x[i + 1] - x[i]), (v[i + 1] - v[i])};
  }
  sort(T + 1, T + N + 1);
  Build(1, n - 1, 1);
  int ANS = 0;
  for (register int i = 1, _n = N; i <= _n; ++i) {
    int id = T[i].id;
    A = T[i].a, B = T[i].b;
    ans[0] = (1 + Mod - P[1]) % Mod;
    ans[1] = P[1];
    if (1 < id) Query(1, id - 1, 1);
    tmp[0] = tmp[1] = 0;
    tmp[B] = 1LL * ans[A] * (B ? P[id + 1] : (1 + Mod - P[id + 1]) % Mod) % Mod;
    ans[0] = tmp[0], ans[1] = tmp[1];
    if (id + 1 <= n - 1) Query(id + 1, n - 1, 1);
    Update(id, 1);
    ANS =
        (ANS + 1LL * (ans[0] + ans[1]) * T[i].S % Mod * Pow(T[i].v, Mod - 2)) %
        Mod;
  }
  printf("%d\n", ANS);
}
int main() {
  _main();
  return 0;
}
