#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long ret = 0;
  char c = getchar();
  while (c < '0' || c > '9') c = getchar();
  while (c >= '0' && c <= '9') ret = ret * 10 + c - '0', c = getchar();
  return ret;
}
const int MAXN = 200005, MOD = 998244353;
long long pow(long long a, long long b, long long p = MOD) {
  long long ret = 1;
  for (; b; a = a * a % p, b >>= 1)
    if (b & 1) ret = ret * a % p;
  return ret;
}
long long inv(long long x, long long p = MOD) { return pow(x, p - 2, p); }
int N;
long long x[MAXN], v[MAXN], p[MAXN];
struct data {
  long long s, v;
  int id, typ;
  data(long long s = 0, long long v = 0, int id = 0, int typ = 0)
      : s(s), v(v), id(id), typ(typ) {}
  friend bool operator<(data d1, data d2) { return d1.s * d2.v < d2.s * d1.v; }
  friend bool operator!=(data d1, data d2) {
    return d1.s * d2.v != d2.s * d1.v;
  }
} D[MAXN];
int Dlen;
int a[MAXN][2][2];
struct sgt {
  long long mat[2][2];
  friend sgt merge(int L, int R, const sgt& l, const sgt& r) {
    int i, j, k, t, mid = (L + R) >> 1;
    sgt ret;
    ret.mat[0][0] = ret.mat[0][1] = ret.mat[1][0] = ret.mat[1][1] = 0;
    for (i = 0; i < 2; ++i)
      for (j = 0; j < 2; ++j) {
        for (k = 0; k < 2; ++k)
          for (t = 0; t < 2; ++t)
            if (!a[mid][k][t]) {
              ret.mat[i][j] = (ret.mat[i][j] + l.mat[i][k] * r.mat[t][j]) % MOD;
            }
      }
    return ret;
  }
} T[MAXN << 2];
void build(int o, int l, int r) {
  if (l == r)
    T[o].mat[0][0] = p[l], T[o].mat[1][0] = T[o].mat[0][1] = 0,
    T[o].mat[1][1] = 1 - p[l];
  else {
    int mid = (l + r) >> 1;
    build(o << 1, l, mid), build(o << 1 | 1, mid + 1, r),
        T[o] = merge(l, r, T[o << 1], T[o << 1 | 1]);
  }
}
void insert(int o, int l, int r, int pos, int x, int y) {
  if (l == r)
    a[l][x][y] = 1;
  else {
    int mid = (l + r) >> 1;
    if (pos <= mid)
      insert(o << 1, l, mid, pos, x, y);
    else
      insert(o << 1 | 1, mid + 1, r, pos, x, y);
    T[o] = merge(l, r, T[o << 1], T[o << 1 | 1]);
  }
}
sgt query(int o, int l, int r, int L, int R) {
  if (l == L && r == R)
    return T[o];
  else {
    int mid = (l + r) >> 1;
    if (R <= mid)
      return query(o << 1, l, mid, L, R);
    else if (L > mid)
      return query(o << 1 | 1, mid + 1, r, L, R);
    else
      return merge(l, r, query(o << 1, l, mid, L, mid),
                   query(o << 1 | 1, mid + 1, r, mid + 1, R));
  }
}
long long ans, prob[MAXN], val[MAXN];
int len;
int main() {
  scanf("%d", &N);
  int i;
  if (N == 1) {
    puts("0");
    return 0;
  }
  for (i = 1; i <= N; ++i)
    scanf("%lld%lld%lld", &x[i], &v[i], &p[i]), p[i] = p[i] * inv(100) % MOD;
  for (i = 1; i < N; ++i) {
    D[++Dlen] = data(x[i + 1] - x[i], v[i + 1] + v[i], i, 1);
    if (v[i] > v[i + 1])
      D[++Dlen] = data(x[i + 1] - x[i], v[i] - v[i + 1], i, 2);
    else if (v[i] < v[i + 1])
      D[++Dlen] = data(x[i + 1] - x[i], v[i + 1] - v[i], i, 3);
  }
  sort(D + 1, D + Dlen + 1);
  build(1, 1, N);
  for (i = 1; i <= Dlen; ++i) {
    if (D[i].typ == 1)
      insert(1, 1, N, D[i].id, 0, 1);
    else if (D[i].typ == 2)
      insert(1, 1, N, D[i].id, 0, 0);
    else
      insert(1, 1, N, D[i].id, 1, 1);
    if (i == Dlen || D[i] != D[i + 1]) {
      sgt ret = query(1, 1, N, 1, N);
      val[++len] = D[i].s * inv(D[i].v) % MOD,
      prob[len] =
          (ret.mat[0][0] + ret.mat[0][1] + ret.mat[1][0] + ret.mat[1][1]) % MOD;
    }
  }
  prob[0] = 1;
  for (i = 1; i <= len; ++i)
    ans = (ans + (prob[i - 1] - prob[i]) * val[i]) % MOD;
  printf("%lld\n", (ans + MOD) % MOD);
  return 0;
}
