#include <bits/stdc++.h>
using namespace std;
struct Mat {
  long long num[2][2];
  Mat() { num[0][0] = num[0][1] = num[1][0] = num[1][1] = 1; }
  Mat(long long a) {
    num[0][0] = num[0][1] = a;
    num[1][0] = 0;
    num[1][1] = (1 + 998244353 - a) % 998244353;
  }
  Mat friend operator*(Mat x1, Mat x2) {
    Mat x3;
    x3.num[0][0] =
        (x1.num[0][0] * x2.num[0][0] + x1.num[0][1] * x2.num[1][0]) % 998244353;
    x3.num[0][1] =
        (x1.num[0][0] * x2.num[0][1] + x1.num[0][1] * x2.num[1][1]) % 998244353;
    x3.num[1][0] =
        (x1.num[1][0] * x2.num[0][0] + x1.num[1][1] * x2.num[1][0]) % 998244353;
    x3.num[1][1] =
        (x1.num[1][0] * x2.num[0][1] + x1.num[1][1] * x2.num[1][1]) % 998244353;
    return x3;
  }
} mp;
struct Point {
  long long v, x;
  int no, k;
  bool friend operator<(Point x1, Point x2) {
    if (x1.x * x2.v == x2.x * x1.v) return x1.no < x2.no;
    return (x1.x * x2.v) > (x2.x * x1.v);
  }
} pp;
struct Node {
  int l, r, mid;
  Mat m;
} tre[400005];
long long p[100005], x[100005], v[100005], ni;
priority_queue<Point> pq;
long long ksm(long long x) {
  long long z = 1, y = 998244353 - 2;
  while (y) {
    if (y % 2) z = (z * x) % 998244353;
    y >>= 1;
    x = (x * x) % 998244353;
  }
  return z;
}
void build(int x, int l, int r) {
  tre[x].l = l;
  tre[x].r = r;
  tre[x].mid = (l + r) / 2;
  if (l == r) {
    tre[x].m.num[0][0] = tre[x].m.num[0][1] =
        (1 + 998244353 - p[l]) % 998244353;
    tre[x].m.num[1][0] = tre[x].m.num[1][1] = p[l];
  } else {
    build(x * 2, l, tre[x].mid);
    build(x * 2 + 1, tre[x].mid + 1, r);
    tre[x].m = tre[x * 2].m * tre[x * 2 + 1].m;
  }
}
Mat ask(int x, int l, int r) {
  if (tre[x].l == l && r == tre[x].r)
    return tre[x].m;
  else if (r <= tre[x].mid)
    return ask(x * 2, l, r);
  else if (l > tre[x].mid)
    return ask(x * 2 + 1, l, r);
  return ask(x * 2, l, tre[x].mid) * ask(x * 2 + 1, tre[x].mid + 1, r);
}
void change(int x, int y, int k) {
  if (tre[x].l == tre[x].r) {
    if (k == 1) tre[x].m.num[1][0] = 0;
    if (k == 2) tre[x].m.num[0][0] = 0;
    if (k == 3) tre[x].m.num[1][1] = 0;
  } else {
    if (y <= tre[x].mid)
      change(x * 2, y, k);
    else
      change(x * 2 + 1, y, k);
    tre[x].m = tre[x * 2].m * tre[x * 2 + 1].m;
  }
}
int main() {
  int n;
  ni = ksm(100);
  long long ans = 0, tp, pl, pr, ppl, ppr;
  scanf("%d", &n);
  scanf("%lld%lld%lld", &x[1], &v[1], &p[1]);
  p[1] = (p[1] * ni) % 998244353;
  for (int i = 1; i < n; i++) {
    pp.no = i;
    scanf("%lld%lld%lld", &x[i + 1], &v[i + 1], &p[i + 1]);
    p[i + 1] = (p[i + 1] * ni) % 998244353;
    pp.x = x[i + 1] - x[i];
    pp.k = 1;
    pp.v = v[i] + v[i + 1];
    pq.push(pp);
    if (v[i] < v[i + 1]) {
      pp.k = 2;
      pp.v = v[i + 1] - v[i];
      pq.push(pp);
    }
    if (v[i] > v[i + 1]) {
      pp.k = 3;
      pp.v = v[i] - v[i + 1];
      pq.push(pp);
    }
  }
  build(1, 0, n);
  while (!pq.empty()) {
    pp = pq.top();
    pq.pop();
    tp = (pp.x * ksm(pp.v)) % 998244353;
    mp = ask(1, pp.no + 1, n);
    pl = mp.num[0][0];
    pr = mp.num[1][0];
    ppl = ppr = 0;
    if (pp.k == 1) ppr = (pl * p[pp.no]) % 998244353;
    if (pp.k == 2) ppl = (pl * (1 + 998244353 - p[pp.no])) % 998244353;
    if (pp.k == 3) ppr = (pr * p[pp.no]) % 998244353;
    mp = ask(1, 0, pp.no - 1);
    pl = (ppl * mp.num[0][0] + ppr * mp.num[0][1]) % 998244353;
    pr = (ppl * mp.num[1][0] + ppr * mp.num[1][1]) % 998244353;
    ans = (ans + tp * (pl + pr)) % 998244353;
    change(1, pp.no, pp.k);
  }
  printf("%lld\n", ans);
  return 0;
}
