#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int mod = 998244353;
void add(int &a, int b) {
  a += b;
  if (a >= mod) a -= mod;
}
void sub(int &a, int b) {
  a -= b;
  if (a < 0) a += mod;
}
int mul(int a, int b) { return 1ll * a * b % mod; }
int inv(int a, int p) { return a == 1 ? 1 : p - 1ll * p * inv(p % a, a) / a; }
int Pow(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = mul(ans, a);
    a = mul(a, a);
    b >>= 1;
  }
  return ans;
}
struct Event {
  int a, b;
  int idx;
  Event(int _a = 0, int _b = 0, int _i = 0) : a(_a), b(_b), idx(_i) {}
};
int x[N];
int v[N];
int p[N];
vector<vector<int> > operator*(const vector<vector<int> > &a,
                               const vector<vector<int> > &b) {
  vector<vector<int> > c(2, vector<int>(2, 0));
  for (int i = 0; i < 2; ++i)
    for (int j = 0; j < 2; ++j)
      add(c[i][j], mul(a[i][0], b[0][j])), add(c[i][j], mul(a[i][1], b[1][j]));
  return c;
}
vector<Event> vec;
vector<vector<int> > tr[N << 2];
void build(int i, int l, int r) {
  if (l == r) {
    tr[i].assign(2, vector<int>(2, 0));
    for (int a = 0; a < 2; ++a)
      for (int b = 0; b < 2; ++b) {
        int spd = 0;
        int prb = 1;
        if (a)
          spd += v[l - 1];
        else
          spd -= v[l - 1];
        if (b)
          spd -= v[l], prb = mul(prb, p[l]);
        else
          spd += v[l], prb = mul(prb, mod + 1 - p[l]);
        tr[i][a][b] = prb;
        if (spd > 0) vec.emplace_back(x[l] - x[l - 1], spd, l * 4 + a * 2 + b);
      }
    return;
  }
  int m = (l + r) / 2;
  build(i << 1, l, m);
  ++m;
  build(i << 1 | 1, m, r);
  tr[i] = tr[i << 1] * tr[i << 1 | 1];
}
void update(int i, int l, int r, int p, int a, int b) {
  if (l > p || r < p) return;
  if (l == r) {
    tr[i][a][b] = 0;
    return;
  }
  int m = (l + r) / 2;
  update(i << 1, l, m, p, a, b);
  ++m;
  update(i << 1 | 1, m, r, p, a, b);
  tr[i] = tr[i << 1] * tr[i << 1 | 1];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  if (n == 1) {
    cout << 0;
    return 0;
  }
  for (int i = 1; i <= n; ++i) {
    cin >> x[i];
    cin >> v[i];
    cin >> p[i];
    p[i] = mul(p[i], inv(100, mod));
  }
  build(1, 2, n);
  sort(vec.begin(), vec.end(), [&](const Event &F1, const Event &F2) {
    return 1ll * F1.a * F2.b < 1ll * F2.a * F1.b;
  });
  int Sum = 0;
  int ans = 0;
  add(Sum, mul(tr[1][0][0] + tr[1][0][1], mod + 1 - p[1]));
  add(Sum, mul(tr[1][1][0] + tr[1][1][1], p[1]));
  for (Event E : vec) {
    int index = E.idx;
    int b = index % 2;
    index /= 2;
    int a = index % 2;
    index /= 2;
    update(1, 2, n, index, a, b);
    int nxt_Sum = 0;
    add(nxt_Sum, mul(tr[1][0][0] + tr[1][0][1], mod + 1 - p[1]));
    add(nxt_Sum, mul(tr[1][1][0] + tr[1][1][1], p[1]));
    sub(Sum, nxt_Sum);
    add(ans, mul(mul(Sum, E.a), inv(E.b, mod)));
    Sum = nxt_Sum;
  }
  cout << ans << endl;
}
