#include <bits/stdc++.h>
using namespace std;
const int p = 998244353;
template <typename T>
inline T read() {
  register T sum = 0;
  register char cc = getchar();
  int sym = 1;
  while (cc != '-' && (cc > '9' || cc < '0')) cc = getchar();
  if (cc == '-') sym = -1, cc = getchar();
  sum = sum * 10 + cc - '0';
  cc = getchar();
  while (cc >= '0' && cc <= '9') sum = sum * 10 + cc - '0', cc = getchar();
  return sym * sum;
}
template <typename T>
inline T read(T &a) {
  a = read<T>();
  return a;
}
template <typename T, typename... Others>
inline void read(T &a, Others &...b) {
  a = read(a);
  read(b...);
}
int add(int x, int y) {
  x += y;
  return x >= p ? x - p : x;
}
int sub(int x, int y) {
  x -= y;
  return x < 0 ? x + p : x;
}
void Add(int &x, int y) {
  x += y;
  if (x >= p) x -= p;
}
int mul(int x, int y) { return 1ll * x * y % p; }
int fpow(int x, int y) {
  int res = 1;
  while (y) {
    if (y & 1) res = mul(res, x);
    x = mul(x, x);
    y >>= 1;
  }
  return res;
}
struct Data {
  int s, v, p, a, b;
  bool operator<(const Data &o) const { return 1ll * s * o.v < 1ll * o.s * v; }
} Q[100010 << 2];
struct Matrix {
  int v[2][2];
  Matrix(int a = 0, int b = 0, int c = 0, int d = 0) {
    v[0][0] = a;
    v[0][1] = b;
    v[1][0] = c;
    v[1][1] = d;
  }
  Matrix operator*(const Matrix &o) const {
    Matrix res;
    for (int i : {0, 1})
      for (int j : {0, 1}) {
        res.v[i][j] = 0;
        for (int k : {0, 1}) Add(res.v[i][j], mul(v[i][k], o.v[k][j]));
      }
    return res;
  }
} M[100010], val[100010 << 2];
int n, ans, cnt, x[100010], v[100010], P[100010][2];
void build(int k, int l, int r) {
  if (l == r) {
    val[k] = M[l];
    return;
  }
  int mid = (l + r) >> 1;
  build(k << 1, l, mid);
  build(k << 1 | 1, mid + 1, r);
  val[k] = val[k << 1] * val[k << 1 | 1];
}
void change(int k, int l, int r, int x) {
  if (l == r) {
    val[k] = M[l];
    return;
  }
  int mid = (l + r) >> 1;
  if (x <= mid)
    change(k << 1, l, mid, x);
  else
    change(k << 1 | 1, mid + 1, r, x);
  val[k] = val[k << 1] * val[k << 1 | 1];
}
int Speed(int i, int a, int b) {
  if (a == 1 && b == 0) return v[i] + v[i + 1];
  if (a == 1 && b == 1) return v[i] - v[i + 1];
  if (a == 0 && b == 0) return v[i + 1] - v[i];
  return -1;
}
int main() {
  read(n);
  if (n == 1) {
    puts("0");
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    read(x[i], v[i], P[i][1]);
    P[i][1] = mul(P[i][1], fpow(100, p - 2));
    P[i][0] = sub(1, P[i][1]);
  }
  for (int i = 1; i < n; i++)
    for (int j : {0, 1})
      for (int k : {0, 1})
        if (Speed(i, j, k) > 0) {
          cnt += 1;
          Q[cnt] = {x[i + 1] - x[i], Speed(i, j, k), i, j, k};
        }
  for (int i = 0; i < n; i++)
    M[i] = Matrix(P[i + 1][0], P[i + 1][1], P[i + 1][0], P[i + 1][1]);
  build(1, 1, n - 1);
  sort(Q + 1, Q + 1 + cnt);
  for (int i = 1; i <= cnt; i++) {
    Matrix m1 = M[Q[i].p], m2;
    m2.v[Q[i].a][Q[i].b] = P[Q[i].p + 1][Q[i].b];
    M[Q[i].p] = m2;
    change(1, 1, n - 1, Q[i].p);
    Matrix m3 = M[0] * val[1];
    int P = add(m3.v[0][0], m3.v[0][1]);
    Add(ans, mul(P, mul(Q[i].s, fpow(Q[i].v, p - 2))));
    m1.v[Q[i].a][Q[i].b] = 0;
    M[Q[i].p] = m1;
    change(1, 1, n - 1, Q[i].p);
  }
  printf("%d\n", ans);
  return 0;
}
