#include <bits/stdc++.h>
using namespace std;
template <typename T>
void maxtt(T& t1, T t2) {
  t1 = max(t1, t2);
}
template <typename T>
void mintt(T& t1, T t2) {
  t1 = min(t1, t2);
}
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string direc = "URDL";
const long long MOD2 = (long long)998244353 * (long long)998244353;
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "YES" : "NO");
  exit(0);
}
void addmod(int& x, int y, int mod = 998244353) {
  x += y;
  if (x >= mod) x -= mod;
  if (x < 0) x += mod;
  assert(x >= 0 && x < mod);
}
void et(int x = -1) {
  printf("%d\n", x);
  exit(0);
}
long long fastPow(long long x, long long y, int mod = 998244353) {
  long long ans = 1;
  while (y > 0) {
    if (y & 1) ans = (x * ans) % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return ans;
}
long long gcd1(long long x, long long y) { return y ? gcd1(y, x % y) : x; }
int T[100035 * 4][2][2], P[100035][2];
bool ban[100035][2][2];
void Up(int rt, int l, int r) {
  int mid = (l + r) / 2;
  for (int(i) = 0; (i) < (int)(2); (i)++)
    for (int(j) = 0; (j) < (int)(2); (j)++) T[rt][i][j] = 0;
  for (int(i) = 0; (i) < (int)(2); (i)++)
    for (int(j) = 0; (j) < (int)(2); (j)++) {
      if (!ban[mid][i][j]) {
        for (int(x) = 0; (x) < (int)(2); (x)++)
          for (int(y) = 0; (y) < (int)(2); (y)++) {
            addmod(T[rt][x][y], (long long)T[(rt << 1)][x][i] *
                                    T[(rt << 1 | 1)][j][y] % 998244353);
          }
      }
    }
}
void build(int rt, int l, int r) {
  if (l == r) {
    T[rt][0][0] = P[l][0];
    T[rt][1][1] = P[l][1];
    return;
  }
  int mid = (l + r) / 2;
  build((rt << 1), l, mid);
  build((rt << 1 | 1), mid + 1, r);
  Up(rt, l, r);
}
void upt(int rt, int l, int r, int L, int val) {
  if (l == r) {
    return;
  }
  int mid = (l + r) / 2;
  if (L <= mid)
    upt((rt << 1), l, mid, L, val);
  else
    upt((rt << 1 | 1), mid + 1, r, L, val);
  Up(rt, l, r);
}
int x[100035], v[100035], p[100035];
struct mb {
  int id, L, V, d1, d2;
  bool operator<(const mb& o) const {
    return (long long)L * o.V < (long long)o.L * V;
  }
} ynk[100035 * 2];
void fmain(int tid) {
  scanf("%d", &n);
  int inv = fastPow(100, 998244353 - 2);
  for (int(i) = 1; (i) <= (int)(n); (i)++) {
    scanf("%d%d%d", x + i, v + i, p + i);
    P[i][1] = (long long)p[i] * inv % 998244353;
    P[i][0] = (1 - P[i][1] + 998244353) % 998244353;
  }
  build(1, 1, n);
  int cnt = 0;
  for (int(i) = 1; (i) <= (int)(n - 1); (i)++) {
    ynk[++cnt] = {i, x[i + 1] - x[i], v[i] + v[i + 1], 1, 0};
    if (v[i] > v[i + 1]) {
      ynk[++cnt] = {i, x[i + 1] - x[i], v[i] - v[i + 1], 1, 1};
    }
    if (v[i] < v[i + 1]) {
      ynk[++cnt] = {i, x[i + 1] - x[i], v[i + 1] - v[i], 0, 0};
    }
  }
  sort(ynk + 1, ynk + 1 + cnt);
  int pre = 1, Ans = 0;
  for (int(i) = 1; (i) <= (int)(cnt); (i)++) {
    ban[ynk[i].id][ynk[i].d1][ynk[i].d2] = 1;
    upt(1, 1, n, ynk[i].id, 0);
    int cur = ((long long)T[1][0][0] + T[1][0][1] + T[1][1][0] + T[1][1][1]) %
              998244353;
    addmod(Ans, (long long)(pre - cur + 998244353) * ynk[i].L % 998244353 *
                    fastPow(ynk[i].V, 998244353 - 2) % 998244353);
    pre = cur;
  }
  printf("%d\n", Ans);
}
int main() {
  int t = 1;
  for (int(i) = 1; (i) <= (int)(t); (i)++) {
    fmain(i);
  }
  return 0;
}
