#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
template <typename T>
inline void Add(T &x, T y) {
  x += y;
  if (x >= mod) x -= mod;
}
template <typename T>
inline void Mul(T &x, T y) {
  (x *= y) %= mod;
}
inline long long Pow(long long x, int y) {
  long long ans = 1;
  for (; y; y >>= 1, x = x * x % mod)
    if (y & 1) ans = ans * x % mod;
  return ans;
}
inline int read() {
  int x = 0;
  char ch = getchar();
  bool f = 0;
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') f = 1;
  for (; ch >= '0' && ch <= '9'; ch = getchar())
    x = (x << 3) + (x << 1) + (ch ^ 48);
  return f ? -x : x;
}
long long p[100010][2];
long long a[100010 << 2][2][2];
bool bo[100010][2][2];
void build(int u, int l, int r) {
  if (l == r) {
    a[u][0][0] = p[l][0];
    a[u][1][1] = p[r][1];
    return;
  }
  int mid = l + r >> 1;
  build((u << 1), l, mid);
  build((u << 1 | 1), mid + 1, r);
  for (int i = (0), end_i = (1); i <= end_i; i++)
    for (int j = (0), end_i = (1); j <= end_i; j++) {
      a[u][i][j] = 0;
      for (int x = (0), end_i = (1); x <= end_i; x++)
        for (int y = (0), end_i = (1); y <= end_i; y++)
          Add(a[u][i][j], a[(u << 1)][i][x] * a[(u << 1 | 1)][y][j] % mod);
    }
}
void update(int u, int l, int r, int x, int p0, int p1) {
  if (l == r) {
    a[u][0][0] = p0 * p[l][0];
    a[u][1][1] = p1 * p[l][1];
    return;
  }
  int mid = l + r >> 1;
  if (x <= mid)
    update((u << 1), l, mid, x, p0, p1);
  else
    update((u << 1 | 1), mid + 1, r, x, p0, p1);
  for (int i = (0), end_i = (1); i <= end_i; i++)
    for (int j = (0), end_i = (1); j <= end_i; j++) a[u][i][j] = 0;
  for (int i = (0), end_i = (1); i <= end_i; i++)
    for (int j = (0), end_i = (1); j <= end_i; j++)
      if (bo[mid][i][j])
        for (int x = (0), end_i = (1); x <= end_i; x++)
          for (int y = (0), end_i = (1); y <= end_i; y++)
            Add(a[u][x][y], a[(u << 1)][x][i] * a[(u << 1 | 1)][j][y] % mod);
}
int m;
struct node {
  double w;
  int i, l, r;
  long long t;
  friend inline bool operator<(const node &A, const node &B) {
    return A.w < B.w;
  }
};
node q[100010 * 3];
inline void add(int i, int l, int r, int x, int v) {
  q[++m] = (node){(double)x / v, i, l, r, x * Pow(v, mod - 2) % mod};
}
int n, x[100010], v[100010];
int main() {
  long long inv = Pow(100, mod - 2);
  n = read();
  for (int i = (1), end_i = (n); i <= end_i; i++)
    x[i] = read(), v[i] = read(), p[i][1] = read() * inv % mod,
    p[i][0] = mod + 1 - p[i][1];
  for (int i = (1), end_i = (n - 1); i <= end_i; i++) {
    add(i, 1, 0, x[i + 1] - x[i], v[i + 1] + v[i]);
    if (v[i] > v[i + 1]) add(i, 1, 1, x[i + 1] - x[i], v[i] - v[i + 1]);
    if (v[i] < v[i + 1]) add(i, 0, 0, x[i + 1] - x[i], v[i + 1] - v[i]);
  }
  sort(q + 1, q + m + 1);
  for (int i = (1), end_i = (n); i <= end_i; i++)
    for (int j = (0), end_i = (1); j <= end_i; j++)
      for (int k = (0), end_i = (1); k <= end_i; k++) bo[i][j][k] = 1;
  build(1, 1, n);
  int i, l, r;
  long long ans = 0;
  for (int k = (1), end_i = (m); k <= end_i; k++) {
    i = q[k].i;
    l = q[k].l, r = q[k].r;
    update(1, 1, n, i, 1 - l, l);
    update(1, 1, n, i + 1, 1 - r, r);
    for (int x = (0), end_i = (1); x <= end_i; x++)
      for (int y = (0), end_i = (1); y <= end_i; y++)
        Add(ans, a[1][x][y] * q[k].t % mod);
    bo[i][l][r] = 0;
    update(1, 1, n, i, 1, 1);
    update(1, 1, n, i + 1, 1, 1);
  }
  printf("%lld", ans);
  return 0;
}
