#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 998244353;
int n, x[1 << 17], v[1 << 17], p[1 << 17], _, $, f[1 << 17][3];
ll ans;
struct st {
  int x, y;
} q[1 << 20];
ll po(ll a, ll b) {
  ll r = 1;
  for (; b; b /= 2, a = a * a % mod)
    if (b & 1) r = r * a % mod;
  return r;
}
struct Rat {
  ll x, y;
  ll Q() { return x % mod * po(y % mod, mod - 2) % mod; }
} E[1 << 17][3];
bool operator<(Rat a, Rat b) { return a.x * b.y < b.x * a.y; }
bool operator==(Rat a, Rat b) { return a.x * b.y == b.x * a.y; }
struct node {
  ll a[2][2];
};
node operator+(node a, node b) {
  node c;
  memset(c.a, 0, sizeof c.a);
  for (int i : {0, 1})
    for (int j : {0, 1})
      for (int k : {0, 1}) {
        if (j == 0 && k == 0 && f[$][2]) continue;
        if (j == 1 && k == 1 && f[$][1]) continue;
        if (j == 1 && k == 0 && f[$][0]) continue;
        for (int l : {0, 1}) (c.a[i][l] += a.a[i][j] * b.a[k][l]) %= mod;
      }
  return c;
}
struct segTree {
  node a[1 << 18];
  void build(int p = 1, int tl = 1, int tr = n) {
    if (tl == tr) {
      a[p].a[0][0] = 1 - ::p[tl], a[p].a[1][1] = ::p[tl];
      return;
    }
    int mid = tl + tr >> 1;
    build(p * 2, tl, mid);
    build(p * 2 + 1, mid + 1, tr);
    $ = mid, a[p] = a[p * 2] + a[p * 2 + 1];
  }
  void ins(int x, int p = 1, int tl = 1, int tr = n) {
    if (tl == tr) return;
    int mid = tl + tr >> 1;
    if (x <= mid)
      ins(x, p * 2, tl, mid);
    else
      ins(x, p * 2 + 1, mid + 1, tr);
    $ = mid, a[p] = a[p * 2] + a[p * 2 + 1];
  }
  node qry(int l, int r, int p = 1, int tl = 1, int tr = n) {
    if (l <= tl && tr <= r) return a[p];
    int mid = tl + tr >> 1;
    if (r <= mid) return qry(l, r, p * 2, tl, mid);
    if (l > mid) return qry(l, r, p * 2 + 1, mid + 1, tr);
    node L = qry(l, r, p * 2, tl, mid), R = qry(l, r, p * 2 + 1, mid + 1, tr);
    $ = mid;
    return L + R;
  }
} tr;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    scanf("%d%d%d", x + i, v + i, p + i),
        p[i] = 1ll * p[i] * po(100, mod - 2) % mod;
  for (int i = 1; i < n; i++) {
    E[i][0] = {x[i + 1] - x[i], v[i] + v[i + 1]}, q[++_] = {i, 0};
    if (v[i] > v[i + 1])
      E[i][1] = {x[i + 1] - x[i], v[i] - v[i + 1]}, q[++_] = {i, 1};
    if (v[i] < v[i + 1])
      E[i][2] = {x[i + 1] - x[i], v[i + 1] - v[i]}, q[++_] = {i, 2};
  }
  sort(q + 1, q + 1 + _, [&](st a, st b) { return E[a.x][a.y] < E[b.x][b.y]; });
  tr.build();
  for (int i = 1; i <= _; i++) {
    Rat now = E[q[i].x][q[i].y];
    node a = tr.qry(1, q[i].x), b = tr.qry(q[i].x + 1, n);
    ll v = now.Q() *
           (a.a[0][q[i].y == 2 ? 0 : 1] + a.a[1][q[i].y == 2 ? 0 : 1]) % mod *
           (b.a[q[i].y == 1 ? 1 : 0][0] + b.a[q[i].y == 1 ? 1 : 0][1]) % mod;
    (ans += v) %= mod;
    f[q[i].x][q[i].y] = 1;
    tr.ins(q[i].x);
    tr.ins(q[i].x + 1);
  }
  printf("%lld\n", (ans + mod) % mod);
  return 0;
}
