#include <bits/stdc++.h>
using namespace std;
int n, leve, INV100, mod = 998244353;
struct Poi {
  int x, v, p;
} a[100011];
struct Eve {
  int id, a, b, timemod;
  double time;
  bool operator<(const Eve &b) const { return time < b.time; }
} eve[100011 * 3];
int powmod(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;
}
double calc(int i, int x, int y) {
  int v1, v2;
  if (x)
    v1 = a[i - 1].v;
  else
    v1 = -a[i - 1].v;
  if (y)
    v2 = a[i].v;
  else
    v2 = -a[i].v;
  return 1.0 * (a[i].x - a[i - 1].x) / (v1 - v2);
}
int calcmod(int i, int x, int y) {
  int v1, v2;
  if (x)
    v1 = a[i - 1].v;
  else
    v1 = -a[i - 1].v;
  if (y)
    v2 = a[i].v;
  else
    v2 = -a[i].v;
  return ((0ll + a[i].x - a[i - 1].x + mod) % mod) * 1ll *
         powmod((0ll + v1 - v2 + mod + mod) % mod, mod - 2) % mod;
}
struct smtnode {
  int ls, rs, v[2][2];
};
struct SMT {
  smtnode a[100011 << 1];
  int n, sz;
  void clear(int N) {
    n = N;
    sz = 0;
  }
  void up(int x) {
    int p = a[x].ls, q = a[x].rs;
    for (int i = 0; i < 2; i++)
      for (int j = 0; j < 2; j++) {
        a[x].v[i][j] = 0;
        for (int k = 0; k < 2; k++)
          a[x].v[i][j] =
              (a[x].v[i][j] + 1ll * a[p].v[i][k] * a[q].v[k][j]) % mod;
      }
  }
  void build(int &x, int L, int R, Poi *b) {
    x = ++sz;
    if (L == R) {
      a[x].ls = a[x].rs = 0;
      a[x].v[0][1] = a[x].v[1][1] = b[L].p;
      a[x].v[0][0] = a[x].v[1][0] = mod + 1 - b[L].p;
      return;
    }
    int mid = (L + R) >> 1;
    build(a[x].ls, L, mid, b);
    build(a[x].rs, mid + 1, R, b);
    up(x);
  }
  void build(Poi *b) {
    int x;
    build(x, 1, n, b);
  }
  int query() { return (0ll + a[1].v[0][0] + a[1].v[0][1]) % mod; }
  void Modify(int x, int L, int R, int p, int q, int r) {
    if (L == R) {
      a[x].v[q][r] = 0;
      return;
    }
    int mid = (L + R) >> 1;
    if (p <= mid)
      Modify(a[x].ls, L, mid, p, q, r);
    else
      Modify(a[x].rs, mid + 1, R, p, q, r);
    up(x);
  }
  void modify(int p, int q, int r) { Modify(1, 1, n, p, q, r); }
} t;
int main() {
  scanf("%d", &n);
  INV100 = powmod(100, mod - 2);
  for (int i = 1; i <= n; i++)
    scanf("%d%d%d", &a[i].x, &a[i].v, &a[i].p),
        a[i].p = a[i].p * 1ll * INV100 % mod;
  leve = 0;
  for (int i = 2; i <= n; i++) {
    eve[++leve] = {i, 1, 0, calcmod(i, 1, 0), calc(i, 1, 0)};
    if (a[i - 1].v > a[i].v)
      eve[++leve] = {i, 1, 1, calcmod(i, 1, 1), calc(i, 1, 1)};
    if (a[i - 1].v < a[i].v)
      eve[++leve] = {i, 0, 0, calcmod(i, 0, 0), calc(i, 0, 0)};
  }
  sort(eve + 1, eve + 1 + leve);
  t.clear(n);
  t.build(a);
  int ans = 0;
  for (int i = 1, tmp, lastval = 1; i <= leve; i++) {
    t.modify(eve[i].id, eve[i].a, eve[i].b);
    tmp = t.query();
    ans = (ans + (lastval - tmp + mod) * 1ll * (eve[i].timemod)) % mod;
    lastval = tmp;
  }
  printf("%d\n", ans);
  return 0;
}
