#include <bits/stdc++.h>
struct Element {
  int p, mask;
  long long uv, dv;
  Element(int p = 0, int mask = 0, long long uv = 0, long long dv = 0)
      : p(p), mask(mask), uv(uv), dv(dv) {}
  bool operator<(const Element& other) const {
    return uv * other.dv < other.uv * dv;
  }
};
struct SegmentT {
  int l, r;
  long long value[4];
};
const long long mod = 998244353;
long long x[100005], v[100005], p[100005];
long long prob[100005][2];
Element meet[400005];
long long need[100005][4];
SegmentT t[800005];
long long power(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
    b /= 2;
  }
  return res;
}
long long inv(long long u) { return power(u, mod - 2); }
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
SegmentT merge(SegmentT& a, SegmentT& b) {
  SegmentT res;
  res.l = a.l, res.r = b.r;
  for (int i = 0; i < 4; i++) res.value[i] = 0;
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      int middle = (i % 2) * 2 + j / 2;
      int next = i / 2 * 2 + j % 2;
      res.value[next] =
          res.value[next] + a.value[i] * b.value[j] * need[a.r][middle] % mod;
      if (res.value[next] >= mod) res.value[next] -= mod;
    }
  }
  return res;
}
void build(int p, int l, int r) {
  t[p].l = l, t[p].r = r;
  if (l == r) {
    t[p].value[1] = t[p].value[2] = 0;
    t[p].value[0] = prob[l][0];
    t[p].value[3] = prob[l][1];
  } else {
    int m = (l + r) / 2;
    build(2 * p, l, m);
    build(2 * p + 1, m + 1, r);
    t[p] = merge(t[2 * p], t[2 * p + 1]);
  }
}
void change(int p, int x) {
  if (t[p].l == t[p].r)
    return;
  else {
    int m = (t[p].l + t[p].r) / 2;
    if (x <= m) change(2 * p, x);
    if (x + 1 > m) change(2 * p + 1, x);
    t[p] = merge(t[2 * p], t[2 * p + 1]);
  }
}
int main() {
  int n;
  scanf("%d", &n);
  long long inv100 = inv(100ll);
  for (int i = 1; i <= n; i++) {
    scanf("%lld%lld%lld", &x[i], &v[i], &p[i]);
    prob[i][0] = (100ll - p[i]) * inv100 % mod;
    prob[i][1] = p[i] * inv100 % mod;
    for (int j = 0; j < 4; j++) need[i][j] = 1;
  }
  build(1, 1, n);
  int size = 0;
  for (int i = 1; i <= n - 1; i++) {
    int j = i + 1;
    long long dis = x[j] - x[i];
    for (int mask = 0; mask < 4; mask++) {
      long long vi = v[i], vj = v[j];
      if (mask & 2) vi *= -1;
      if (mask & 1) vj *= -1;
      long long diffv = vj - vi;
      if (diffv > 0) {
        long long g = gcd(dis, diffv);
        meet[++size] = Element(i, mask, dis / g, diffv / g);
      }
    }
  }
  std::sort(meet + 1, meet + 1 + size);
  long long ans = 0, curProb = 1;
  int p = 1;
  while (p <= size) {
    int np = p;
    while (np + 1 <= size && meet[np + 1].uv == meet[p].uv &&
           meet[np + 1].dv == meet[p].dv)
      np++;
    long long lastProb = curProb;
    for (int i = p; i <= np; i++) {
      need[meet[i].p][meet[i].mask] = 0;
      change(1, meet[i].p);
    }
    curProb = 0;
    for (int i = 0; i < 4; i++) {
      curProb += t[1].value[i];
      if (curProb >= mod) curProb -= mod;
    }
    long long midProb = lastProb - curProb;
    if (midProb < 0) midProb += mod;
    long long time = meet[p].uv * inv(meet[p].dv) % mod;
    ans += midProb * time % mod;
    if (ans >= mod) ans -= mod;
    p = np + 1;
  }
  printf("%lld\n", ans);
  return 0;
}
