#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 998244353;
long long int pw(long long int a, long long int n) {
  if (n == 0) return 1;
  long long int q = pw(a, n / 2);
  if (n % 2 == 0) return q * q % MOD;
  return q * q % MOD * a % MOD;
}
struct Proton {
  long long int x, v, p;
} proton[100005];
struct Collision {
  long long int dist, v;
  int pos, dir1, dir2;
};
void debug(long long int x) {
  for (int b = 1; b <= 10000; b++) {
    long long int a = x * b % MOD;
    if (a <= 10000) {
      cout << a << "/" << b << " ";
      return;
    }
  }
}
struct Matrix {
  long long int coef[2][2];
  Matrix() { memset(coef, 0, sizeof(coef)); }
  long long int sumCoef() {
    long long int res = 0;
    for (int i = 0; i <= 1; i++) {
      for (int j = 0; j <= 1; j++) {
        res = (res + coef[i][j]) % MOD;
      }
    }
    return res;
  }
} st[400005];
long long int inv[100005][2];
void merge(int id, int mid) {
  st[id] = Matrix();
  for (int i = 0; i <= 1; i++) {
    for (int j = 0; j <= 1; j++) {
      for (int k = 0; k <= 1; k++) {
        st[id].coef[i][j] += st[id * 2].coef[i][k] * st[id * 2 + 1].coef[k][j] %
                             MOD * inv[mid + 1][k] % MOD;
        st[id].coef[i][j] %= MOD;
      }
    }
  }
}
void build(int id, int l, int r) {
  if (l == r) {
    long long int u = proton[l].p;
    long long int v = proton[l + 1].p;
    st[id].coef[0][0] = (1 - u + MOD) * (1 - v + MOD) % MOD;
    st[id].coef[0][1] = (1 - u + MOD) * v % MOD;
    st[id].coef[1][0] = u * (1 - v + MOD) % MOD;
    st[id].coef[1][1] = u * v % MOD;
    return;
  }
  int mid = (l + r) / 2;
  build(id * 2, l, mid);
  build(id * 2 + 1, mid + 1, r);
  merge(id, mid);
}
void update(int id, int l, int r, int u, int i, int j) {
  if (l == r) {
    st[id].coef[i][j] = 0;
    return;
  }
  int mid = (l + r) / 2;
  if (u <= mid)
    update(id * 2, l, mid, u, i, j);
  else
    update(id * 2 + 1, mid + 1, r, u, i, j);
  merge(id, mid);
}
long long int query() {
  long long int res = 0;
  for (int i = 0; i <= 1; i++) {
    for (int j = 0; j <= 1; j++) {
      res = (res + st[1].coef[i][j]) % MOD;
    }
  }
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  int n;
  cin >> n;
  if (n == 1) {
    cout << 0 << endl;
    return 0;
  }
  long long int rev100 = pw(100, MOD - 2);
  for (int i = 1; i <= n; i++) {
    cin >> proton[i].x >> proton[i].v >> proton[i].p;
    proton[i].p = proton[i].p * rev100 % MOD;
    inv[i][1] = pw(proton[i].p, MOD - 2);
    inv[i][0] = pw(1 + MOD - proton[i].p, MOD - 2);
  }
  vector<Collision> collision;
  for (int i = 1; i <= n - 1; i++) {
    Collision c1 = {0, 0, i, 0, 0};
    Collision c2 = c1;
    c1.dist = c2.dist = proton[i + 1].x - proton[i].x;
    c1.v = proton[i].v + proton[i + 1].v;
    c1.dir1 = 1, c1.dir2 = 0;
    collision.push_back(c1);
    c2.v = abs(proton[i + 1].v - proton[i].v);
    if (proton[i].v > proton[i + 1].v) {
      c2.dir1 = 1;
      c2.dir2 = 1;
    }
    if (proton[i].v < proton[i + 1].v) {
      c2.dir1 = c2.dir2 = 0;
    }
    if (c2.v) {
      collision.push_back(c2);
    }
  }
  sort(collision.begin(), collision.end(),
       [](Collision a, Collision b) { return a.dist * b.v < b.dist * a.v; });
  build(1, 1, n - 1);
  long long int last = 1;
  long long int res = 0;
  for (auto c : collision) {
    long long int time = c.dist * pw(c.v, MOD - 2) % MOD;
    update(1, 1, n - 1, c.pos, c.dir1, c.dir2);
    long long int newLast = query();
    long long int prob = (last - newLast + MOD) % MOD;
    last = newLast;
    prob %= MOD;
    res = (res + prob * time % MOD) % MOD;
  }
  cout << res << endl;
  return 0;
}
