#include <bits/stdc++.h>
using namespace std;
struct node {
  int v[2][2];
} tr[400005];
struct frac {
  int x, y;
  bool operator<(const frac& z) const { return 1ll * x * z.y < 1ll * y * z.x; }
  frac() {}
  frac(int ux, int uy) {
    x = ux;
    y = uy;
  }
};
struct eve {
  frac tp;
  int id, ty0, ty1;
  eve() {}
  eve(frac trp, int x, int y, int z) : tp(trp), id(x), ty0(y), ty1(z) {}
  bool operator<(const eve& y) const { return tp < y.tp; }
} ap[300005];
int cnt = 0, n, pre, pos, tmp, ans = 0, pr[100005][2], x[100005], v[100005],
    mat[100005][2][2], inv;
const int mod = 998244353;
node operator*(node a, node b) {
  node c;
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 2; j++)
      c.v[i][j] =
          (1ll * a.v[i][0] * b.v[0][j] + 1ll * a.v[i][1] * b.v[1][j]) % mod;
  return c;
}
int mypow(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = 1ll * ans * a % mod;
    a = 1ll * a * a % mod;
    b >>= 1;
  }
  return ans;
}
void iden(int id, int ty0, int ty1, int x, int y) {
  if (y <= 0) return;
  ap[++cnt] = eve(frac(x, y), id, ty0, ty1);
}
void build(int p, int l, int r) {
  int mid;
  if (l == r) {
    tr[p].v[0][0] = tr[p].v[0][1] = pr[l][0];
    tr[p].v[1][0] = tr[p].v[1][1] = pr[l][1];
    return;
  }
  mid = (l + r) / 2;
  build(2 * p, l, mid);
  build(2 * p + 1, mid + 1, r);
  tr[p] = tr[2 * p] * tr[2 * p + 1];
}
void modify(int p, int l, int r) {
  int mid;
  if (l == r) {
    for (int i = 0; i < 2; i++)
      for (int j = 0; j < 2; j++)
        tr[p].v[i][j] = (mat[l][i][j] == 0 ? pr[l][i] : 0);
    return;
  }
  mid = (l + r) / 2;
  if (pos <= mid)
    modify(2 * p, l, mid);
  else
    modify(2 * p + 1, mid + 1, r);
  tr[p] = tr[2 * p] * tr[2 * p + 1];
}
int val(frac x) { return 1ll * x.x * mypow(x.y, mod - 2) % mod; }
int M(int x) { return x >= mod ? x - mod : x; }
int nw() {
  int ans = 0;
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 2; j++)
      ans = (1ll * ans + 1ll * tr[1].v[i][j] * pr[n][j]) % mod;
  return ans;
}
int main() {
  inv = mypow(100, mod - 2);
  scanf("%d", &n);
  if (n == 1) {
    printf("0\n");
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d%d%d", &x[i], &v[i], &pr[i][1]);
    pr[i][1] = 1ll * pr[i][1] * inv % mod;
    pr[i][0] = (mod + 1 - pr[i][1]) % mod;
  }
  for (int i = 1; i < n; i++) {
    iden(i, 0, 0, x[i + 1] - x[i], v[i + 1] - v[i]);
    iden(i, 1, 0, x[i + 1] - x[i], v[i] + v[i + 1]);
    iden(i, 1, 1, x[i + 1] - x[i], v[i] - v[i + 1]);
  }
  sort(ap + 1, ap + cnt + 1);
  build(1, 1, n - 1);
  pre = 1;
  for (int i = 1; i <= cnt; i++) {
    mat[ap[i].id][ap[i].ty0][ap[i].ty1] = 1;
    pos = ap[i].id;
    modify(1, 1, n - 1);
    ans = (1ll * ans + 1ll * val(ap[i].tp) * (pre - (tmp = nw())) % mod + mod) %
          mod;
    pre = tmp;
  }
  printf("%d\n", ans);
  return 0;
}
