#include <bits/stdc++.h>
using namespace std;
struct P {
  int id, x1, x2, x, v;
};
struct Matrix {
  int op[3][3];
  void toE() { op[1][1] = op[2][2] = 1, op[1][2] = op[2][1] = 0; }
  void operator*=(const Matrix& s) {
    int tmp[3][3];
    tmp[1][1] = tmp[1][2] = tmp[2][1] = tmp[2][2] = 0;
    for (int i = 1; i <= 2; i++) {
      for (int j = 1; j <= 2; j++) {
        for (int k = 1; k <= 2; k++)
          tmp[i][j] = (tmp[i][j] + 1ll * op[i][k] * s.op[k][j]) % 998244353;
      }
    }
    op[1][1] = tmp[1][1], op[1][2] = tmp[1][2], op[2][1] = tmp[2][1],
    op[2][2] = tmp[2][2];
  }
} nd[100000 + 5 << 2], t1, t2, t3, t4;
vector<P> vec;
int n, x[100000 + 5], v[100000 + 5], p[100000 + 5], ans;
inline int inv(int x) {
  int ans = 1, sta = x, y = 998244353 - 2;
  while (y) {
    if (y & 1) ans = 1ll * ans * sta % 998244353;
    sta = 1ll * sta * sta % 998244353, y >>= 1;
  }
  return ans;
}
void getTime(int a, int b, int id, int& xx, int& vv) {
  int t = 0;
  if (id == 0) {
    if (v[a] > v[b])
      xx = (x[b] - x[a]), vv = v[a] - v[b];
    else
      xx = 0x7fffffff;
  } else if (id == 3) {
    if (v[b] > v[a])
      xx = x[b] - x[a], vv = v[b] - v[a];
    else
      xx = 0x7fffffff;
  } else if (id == 1) {
    xx = x[b] - x[a], vv = v[a] + v[b];
  } else
    xx = 0x7fffffff;
}
void build(int l = 1, int r = n, int k = 1) {
  if (l == r) {
    nd[k].op[1][1] = nd[k].op[2][1] = 1ll * (100 - p[l]) * inv(100) % 998244353;
    nd[k].op[1][2] = nd[k].op[2][2] = 1ll * p[l] * inv(100) % 998244353;
    return;
  }
  int mid = (l + r) >> 1;
  build(l, mid, k << 1), build(mid + 1, r, k << 1 | 1);
  nd[k].toE(), nd[k] *= nd[k << 1], nd[k] *= nd[k << 1 | 1];
}
void change(int at, const Matrix& s, int l = 1, int r = n, int k = 1) {
  if (l == r) {
    nd[k] = s;
    return;
  }
  int mid = (l + r) >> 1;
  if (at <= mid)
    change(at, s, l, mid, k << 1);
  else
    change(at, s, mid + 1, r, k << 1 | 1);
  nd[k].toE(), nd[k] *= nd[k << 1], nd[k] *= nd[k << 1 | 1];
}
const Matrix& getMatrix(int at, int l = 1, int r = n, int k = 1) {
  if (l == r) return nd[k];
  int mid = (l + r) >> 1;
  if (at <= mid) return getMatrix(at, l, mid, k << 1);
  return getMatrix(at, mid + 1, r, k << 1 | 1);
}
inline int get() { return (nd[1].op[1][1] + nd[1].op[1][2]) % 998244353; }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d%d", x + i, v + i, p + i);
  for (int i = 2; i <= n; i++) {
    P ps;
    ps.x1 = i - 1, ps.x2 = i;
    for (int j = 0, pp; j < 4; j++) {
      getTime(i - 1, i, j, ps.x, ps.v);
      if (ps.x != 0x7fffffff) ps.id = j, vec.push_back(ps);
    }
  }
  sort(vec.begin(), vec.end(),
       [](P a, P b) { return 1ll * a.x * b.v < 1ll * b.x * a.v; });
  build();
  for (P s : vec) {
    t3 = t1 = getMatrix(s.x1), t4 = t2 = getMatrix(s.x2);
    if (s.id & 1)
      t2.op[1][2] = t2.op[2][2] = 0;
    else
      t2.op[1][1] = t2.op[2][1] = 0;
    if (s.id & 2)
      t1.op[1][2] = t1.op[2][2] = 0;
    else
      t1.op[1][1] = t1.op[2][1] = 0;
    change(s.x1, t1), change(s.x2, t2);
    ans = (ans + 1ll * s.x * inv(s.v) % 998244353 * get()) % 998244353;
    if (s.id == 0)
      t4.op[2][2] = 0;
    else if (s.id == 1)
      t4.op[2][1] = 0;
    else if (s.id == 3)
      t4.op[1][1] = 0;
    change(s.x1, t3), change(s.x2, t4);
  }
  printf("%d", (ans + 998244353) % 998244353);
  return 0;
}
