#include <bits/stdc++.h>
const int N = 1e5 + 5;
const int mod = 998244353;
using namespace std;
int n, x[N], v[N], p[N], cnt, inv, ans;
struct node {
  int x, v, id, l, r;
} a[N << 2];
struct Matrix {
  int m[2][2];
  Matrix() { m[0][0] = m[1][0] = m[0][1] = m[1][1] = 0; }
} mat[N << 2], tra[N], org;
template <typename T>
inline T read() {
  T x = 0, w = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') w = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return x * w;
}
Matrix operator*(const Matrix a, const Matrix b) {
  Matrix c;
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 2; j++)
      for (int k = 0; k < 2; k++)
        c.m[i][j] = (1ll * a.m[i][k] * b.m[k][j] + c.m[i][j]) % mod;
  return c;
}
void pushup(int p) { mat[p] = mat[p << 1] * mat[p << 1 | 1]; }
void build(int p, int l, int r) {
  if (l == r) return (void)(mat[p] = tra[l]);
  int mid = (l + r) >> 1;
  build(p << 1, l, mid), build(p << 1 | 1, mid + 1, r);
  pushup(p);
}
void modify(int p, int l, int r, int k, Matrix x) {
  if (l == r) return (void)(mat[p] = x);
  int mid = (l + r) >> 1;
  if (k <= mid)
    modify(p << 1, l, mid, k, x);
  else
    modify(p << 1 | 1, mid + 1, r, k, x);
  pushup(p);
}
int fpow(int x, int y) {
  int res = 1;
  for (; y; y >>= 1, x = 1ll * x * x % mod)
    if (y & 1) res = 1ll * res * x % mod;
  return res;
}
int get_speed(int i, int l, int r) {
  if (l == 0 && r == 1) return -1;
  if (l == 1 && r == 1) return v[i] - v[i + 1];
  if (l == 0 && r == 0) return v[i + 1] - v[i];
  return v[i + 1] + v[i];
}
void mul(int &x, int &y, Matrix z) {
  int x1 = 0, x2 = 0;
  x1 = (1ll * x * z.m[0][0] + 1ll * y * z.m[1][0]) % mod;
  x2 = (1ll * x * z.m[0][1] + 1ll * y * z.m[1][1]) % mod;
  x = x1, y = x2;
}
bool cmp(node a, node b) { return 1ll * a.x * b.v < 1ll * b.x * a.v; }
int main() {
  n = read<int>(), inv = fpow(100, mod - 2), org.m[0][0] = org.m[1][1] = 1;
  for (int i = 1; i <= n; i++)
    x[i] = read<int>(), v[i] = read<int>(), p[i] = read<int>();
  if (n == 1) {
    puts("0");
    return 0;
  }
  for (int i = 1; i <= n; i++)
    p[i] = 1ll * p[i] * inv % mod, p[i] = (1 - p[i] + mod) % mod;
  for (int tmp, i = 1; i < n; i++)
    for (int j = 0; j < 2; j++)
      for (int k = 0; k < 2; k++) {
        if ((tmp = get_speed(i, j, k)) <= 0) continue;
        a[++cnt].x = x[i + 1] - x[i], a[cnt].v = tmp;
        a[cnt].id = i + 1, a[cnt].l = j, a[cnt].r = k;
      }
  for (int i = 2; i <= n; i++) {
    tra[i].m[0][0] = tra[i].m[1][0] = p[i];
    tra[i].m[0][1] = tra[i].m[1][1] = (1 - p[i] + mod) % mod;
  }
  build(1, 2, n), sort(a + 1, a + cnt + 1, cmp);
  for (int t, x, y, id, i = 1; i <= cnt; i++) {
    t = 1ll * a[i].x * fpow(a[i].v, mod - 2) % mod, x = p[1],
    y = (1 - p[1] + mod) % mod, id = a[i].id;
    Matrix tmp;
    tmp.m[a[i].l][a[i].r] = a[i].r ? (1 - p[id] + mod) % mod : p[id],
    modify(1, 2, n, id, tmp);
    tmp = mat[1], mul(x, y, tmp);
    ans = (1ll * (x + y) * t + ans) % mod;
    tra[id].m[a[i].l][a[i].r] = 0, modify(1, 2, n, id, tra[id]);
  }
  printf("%d\n", ans);
  return 0;
}
