#include <bits/stdc++.h>
const long long mod = 119 << 23 | 1;
long long qpow(long long x, long long k) {
  long long r = 1;
  for (; k; k >>= 1, (x *= x) %= mod)
    if (k & 1) (r *= x) %= mod;
  return r;
}
int n;
struct matrix {
  int a, b, c, d;
  matrix(int _a = 1, int _b = 0, int _c = 0, int _d = 1) {
    a = _a, b = _b, c = _c, d = _d;
  }
};
matrix operator*(matrix x, matrix y) {
  return matrix((x.a * 1ll * y.a + x.b * 1ll * y.c) % mod,
                (x.a * 1ll * y.b + x.b * 1ll * y.d) % mod,
                (x.c * 1ll * y.a + x.d * 1ll * y.c) % mod,
                (x.c * 1ll * y.b + x.d * 1ll * y.d) % mod);
}
struct segtree {
  matrix mt[1111111];
  void pushu(int p) { mt[p] = mt[p << 1 | 1] * mt[p << 1]; }
  void updata(int f, const matrix& y, int p = 1, int l = 1, int r = n - 1) {
    if (l == r) {
      mt[p] = y;
      return;
    }
    int mid = (l + r) >> 1, dir = f > mid;
    (dir ? l = mid + 1 : r = mid), updata(f, y, p << 1 | dir, l, r), pushu(p);
  }
} T;
matrix ini[111111];
struct pii {
  double t;
  int x, op, modl;
} p[1111111];
bool operator<(const pii x, const pii y) { return x.t < y.t; }
int top;
void push(double t, int x, int y, int M) { p[++top] = (pii){t, x, y, M}; }
int X[1111111], V[1111111], q[1111111];
int main() {
  scanf("%d", &n);
  register int i;
  const int prob = qpow(100, mod - 2);
  for (i = 1; i <= n; i++)
    scanf("%d%d%d", X + i, V + i, q + i), q[i] = q[i] * 1ll * prob % mod;
  for (i = 1; i < n; i++) {
    ini[i] = matrix(q[i + 1], q[i + 1], mod + 1 - q[i + 1], mod + 1 - q[i + 1]),
    T.updata(i, ini[i]);
    push((X[i + 1] - X[i]) * 1.0 / (V[i] + V[i + 1]), i, 3,
         qpow(V[i] + V[i + 1], mod - 2) * 1ll * (X[i + 1] - X[i]) % mod);
    if (V[i] > V[i + 1])
      push((X[i + 1] - X[i]) * 1.0 / (V[i] - V[i + 1]), i, 1,
           qpow(V[i] - V[i + 1], mod - 2) * 1ll * (X[i + 1] - X[i]) % mod);
    else if (V[i + 1] > V[i])
      push((X[i + 1] - X[i]) * 1.0 / (V[i + 1] - V[i]), i, 4,
           qpow(V[i + 1] - V[i], mod - 2) * 1ll * (X[i + 1] - X[i]) % mod);
  }
  std::sort(p + 1, p + top + 1);
  long long ans = 0;
  matrix beg = matrix(q[1], 0, mod + 1 - q[1], 0);
  for (i = 1; i <= top; i++) {
    int g = p[i].x;
    matrix Lim = ini[g];
    if (p[i].op == 1) ini[g].a = Lim.b = Lim.c = Lim.d = 0;
    if (p[i].op == 3) Lim.a = Lim.b = ini[g].c = Lim.d = 0;
    if (p[i].op == 4) Lim.a = Lim.b = Lim.c = ini[g].d = 0;
    T.updata(g, Lim);
    matrix E = T.mt[1] * beg;
    ans += (E.a + E.c) * 1ll * p[i].modl % mod, T.updata(g, ini[g]);
  }
  printf("%lld\n", ans % mod);
}
