#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353, inv2 = (MOD + 1) / 2;
int dx[4] = {-1, 1, 0, 0};
int dy[4] = {0, 0, -1, 1};
int read() {
  int v = 0, f = 1;
  char c = getchar();
  while (c < 48 || 57 < c) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (48 <= c && c <= 57) v = (v << 3) + v + v + c - 48, c = getchar();
  return v * f;
}
long long readll() {
  long long v = 0, f = 1;
  char c = getchar();
  while (c < 48 || 57 < c) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (48 <= c && c <= 57) v = (v << 3) + v + v + c - 48, c = getchar();
  return v * f;
}
long long x[100000 + 10], v[100000 + 10], p[100000 + 10][2],
    ans[100000 + 10 << 2];
struct Ma {
  int n, m;
  long long a[2][2];
  Ma() {
    n = m = 2;
    memset(a, 0, sizeof(a));
  }
  void init() {
    n = m = 2;
    memset(a, 0, sizeof(a));
  }
  Ma operator+(Ma b) const {
    Ma c;
    c.n = n;
    c.m = m;
    for (int i = (int)0; i <= (int)n - 1; i++)
      for (int j = (int)0; j <= (int)m - 1; j++)
        c.a[i][j] = a[i][j] + b.a[i][j];
    return c;
  }
  Ma operator-(Ma b) const {
    Ma c;
    c.n = n;
    c.m = m;
    for (int i = (int)0; i <= (int)n - 1; i++)
      for (int j = (int)0; j <= (int)m - 1; j++)
        c.a[i][j] = a[i][j] - b.a[i][j];
    return c;
  }
  Ma operator*(Ma b) const {
    Ma c;
    c.init();
    c.n = n;
    c.m = b.m;
    for (int i = (int)0; i <= (int)n - 1; i++)
      for (int j = (int)0; j <= (int)b.m - 1; j++)
        for (int k = (int)0; k <= (int)m - 1; k++)
          c.a[i][j] = (c.a[i][j] + a[i][k] * b.a[k][j] % MOD) % MOD;
    return c;
  }
} t[100000 + 10 << 4], c[100000 + 10];
struct Q {
  long long x, y;
  int id, op1, op2;
} q[100000 + 10 << 2];
bool cmp(Q a, Q b) { return a.x * b.y > a.y * b.x; }
void pushup(int p) { t[p] = t[p << 1] * t[p << 1 | 1]; }
void build(int l, int r, int p) {
  if (l == r) {
    t[p] = c[l];
    return;
  }
  int mid = (l + r) >> 1;
  build(l, mid, p << 1);
  build(mid + 1, r, p << 1 | 1);
  pushup(p);
}
void update(int l, int r, int x, int p) {
  if (l == r) {
    t[p] = c[x];
    return;
  }
  int mid = (l + r) >> 1;
  if (x <= mid)
    update(l, mid, x, p << 1);
  else
    update(mid + 1, r, x, p << 1 | 1);
  pushup(p);
}
long long pw(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y & 1) res = res * x % MOD;
    x = x * x % MOD;
    y >>= 1;
  }
  return res;
}
long long inv(long long x) { return pw(x, MOD - 2); }
int main() {
  int n = read();
  long long inv100 = inv(100);
  for (int i = (int)1; i <= (int)n; i++)
    x[i] = readll(), v[i] = readll(), p[i][0] = readll() * inv100 % MOD,
    p[i][1] = (1 - p[i][0] + MOD) % MOD;
  c[1].n = c[1].m = 2;
  c[1].a[0][0] = p[1][0];
  c[1].a[0][1] = p[1][1];
  int m = 0;
  for (int i = (int)2; i <= (int)n; i++) {
    c[i].n = c[i].m = 2;
    if (v[i - 1] > v[i]) {
      m++;
      q[m].x = x[i] - x[i - 1];
      q[m].y = v[i - 1] - v[i];
      q[m].id = i;
      q[m].op1 = q[m].op2 = 0;
    } else
      c[i].a[0][0] = p[i][0];
    if (v[i - 1] < v[i]) {
      m++;
      q[m].x = x[i] - x[i - 1];
      q[m].y = v[i] - v[i - 1];
      q[m].id = i;
      q[m].op1 = q[m].op2 = 1;
    } else
      c[i].a[1][1] = p[i][1];
    c[i].a[1][0] = p[i][0];
    m++;
    q[m].x = x[i] - x[i - 1];
    q[m].y = v[i] + v[i - 1];
    q[m].id = i;
    q[m].op1 = 0;
    q[m].op2 = 1;
  }
  sort(q + 1, q + 1 + m, cmp);
  build(1, n, 1);
  ans[0] = (t[1].a[0][0] + t[1].a[0][1]) % MOD;
  long long res = 0;
  for (int i = (int)1; i <= (int)m; i++) {
    int x = q[i].op1, y = q[i].op2, id = q[i].id;
    c[id].a[x][y] = p[id][y];
    update(1, n, id, 1);
    ans[i] = (t[1].a[0][0] + t[1].a[0][1]) % MOD;
    res = (res + 1ll * (ans[i] + MOD - ans[i - 1]) * q[i].x % MOD *
                     inv(q[i].y) % MOD) %
          MOD;
  }
  res = (res % MOD + MOD) % MOD;
  printf("%I64d\n", res);
  return 0;
}
