#include <bits/stdc++.h>
using namespace std;
template <typename _T>
inline void _DBG(const char *s, _T x) {
  cerr << s << " = " << x << "\n";
}
template <typename _T, typename... args>
void _DBG(const char *s, _T x, args... a) {
  while (*s != ',') cerr << *s++;
  cerr << " = " << x << ',';
  _DBG(s + 1, a...);
}
const int N = 1e5 + 7;
const int MAX = 1 << 17;
const int M = 998244353;
long long fast(long long a, long long n) {
  long long r = 1;
  while (n) {
    if (n & 1) r = r * a % M;
    a = a * a % M;
    n /= 2;
  }
  return r;
}
long long inv(long long a) { return fast(a, M - 2); }
long long rev(long long x) { return (1 + M - x >= M ? 1 - x : 1 + M - x); }
struct node {
  long long T[2][2], l, r;
  node() { T[0][0] = T[0][1] = T[1][0] = T[1][1] = 0; }
  long long get() {
    return ((long long)T[0][0] + T[0][1] + T[1][0] + T[1][1]) % M;
  }
};
int n;
long long X[N], V[N], P[N], invP[N][2];
node merge(const node &a, const node &b) {
  node r;
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 2; j++)
      for (int k = 0; k < 2; k++)
        r.T[i][j] = (r.T[i][j] + a.T[i][k] * b.T[k][j] % M * invP[a.r][k]);
  r.T[0][0] %= M;
  r.T[0][1] %= M;
  r.T[1][0] %= M;
  r.T[1][1] %= M;
  r.l = a.l;
  r.r = b.r;
  return r;
}
void merge(const node &a, const node &b, node &r) {
  r.T[0][0] = r.T[0][1] = r.T[1][0] = r.T[1][1] = 0;
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 2; j++)
      for (int k = 0; k < 2; k++)
        r.T[i][j] = (r.T[i][j] + a.T[i][k] * b.T[k][j] % M * invP[a.r][k]);
  r.T[0][0] %= M;
  r.T[0][1] %= M;
  r.T[1][0] %= M;
  r.T[1][1] %= M;
  r.l = a.l;
  r.r = b.r;
}
node tree[2 * MAX];
void update(int e, long long v, int a, int b) {
  e += MAX;
  tree[e].T[a][b] = v;
  for (int i = e / 2; i >= 1; i /= 2)
    merge(tree[2 * i], tree[2 * i + 1], tree[i]);
}
node query(int a, int b) {
  a += MAX, b += MAX;
  if (a == b) return tree[a];
  node l = tree[a], r = tree[b];
  while (a / 2 != b / 2) {
    if (a % 2 == 0) l = merge(l, tree[a + 1]);
    if (b % 2 == 1) r = merge(tree[b - 1], r);
    a /= 2, b /= 2;
  }
  return merge(l, r);
}
struct event {
  long long d, t, p;
  int a, b, i;
};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  if (n == 1) {
    cout << 0 << "\n";
    return 0;
  }
  long long inv100 = inv(100);
  for (int i = 1; i <= n; i++) {
    cin >> X[i] >> V[i] >> P[i];
    P[i] = P[i] * inv100 % M;
    invP[i][1] = inv(P[i]);
    invP[i][0] = inv(rev(P[i]));
  }
  n--;
  vector<event> events;
  for (int i = 1; i <= n; i++) {
    tree[i + MAX].l = i;
    tree[i + MAX].r = i + 1;
    tree[i + MAX].T[0][0] = rev(P[i]) * rev(P[i + 1]) % M;
    tree[i + MAX].T[0][1] = rev(P[i]) * P[i + 1] % M;
    tree[i + MAX].T[1][0] = P[i] * rev(P[i + 1]) % M;
    update(i, P[i] * P[i + 1] % M, 1, 1);
    events.push_back(
        {X[i + 1] - X[i], V[i + 1] + V[i], P[i] * rev(P[i + 1]) % M, 1, 0, i});
    if (V[i] > V[i + 1])
      events.push_back(
          {X[i + 1] - X[i], V[i] - V[i + 1], P[i] * P[i + 1] % M, 1, 1, i});
    if (V[i] < V[i + 1])
      events.push_back({X[i + 1] - X[i], V[i + 1] - V[i],
                        rev(P[i]) * rev(P[i + 1]) % M, 0, 0, i});
  }
  sort((events).begin(), (events).end(), [](const event &e1, const event &e2) {
    return e1.d * e2.t < e2.d * e1.t;
  });
  long long ans = 0, last = 1;
  for (auto e : events) {
    update(e.i, 0, e.a, e.b);
    node r = query(1, n);
    long long p = r.get();
    ans = (ans + (last - p) * e.d % M * inv(e.t) % M) % M;
    last = p;
  }
  cout << (ans + M) % M << "\n";
  return 0;
}
