#include <bits/stdc++.h>
using namespace std;
template <typename T>
bool get_int(T &x) {
  char t = getchar();
  bool neg = false;
  x = 0;
  for (; (t > '9' || t < '0') && t != '-' && t != EOF; t = getchar())
    ;
  if (t == '-') neg = true, t = getchar();
  if (t == EOF) return false;
  for (; t <= '9' && t >= '0'; t = getchar()) x = x * 10 + t - '0';
  if (neg) x = -x;
  return true;
}
template <typename T>
void print_int(T x) {
  if (x < 0) putchar('-'), x = -x;
  short a[20] = {}, sz = 0;
  while (x > 0) a[sz++] = x % 10, x /= 10;
  if (sz == 0) putchar('0');
  for (int i = sz - 1; i >= 0; i--) putchar('0' + a[i]);
}
const int inf = 0x3f3f3f3f;
const long long Linf = 1ll << 61;
const double pi = acos(-1.0);
const int maxn = 100111;
const int mod = 998244353;
int qpow(int x, int y) {
  int ret = 1;
  while (y) {
    if (y & 1) ret = (long long)ret * x % mod;
    x = (long long)x * x % mod;
    y >>= 1;
  }
  return ret;
}
struct matrix {
  int a[2][2];
  matrix() { memset(a, 0, sizeof(a)); }
  void set(int x) {
    a[0][1] = a[1][0] = 0;
    a[0][0] = a[1][1] = x;
  }
};
matrix operator*(const matrix &a, const matrix &b) {
  matrix ret;
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 2; j++)
      for (int k = 0; k < 2; k++)
        ret.a[i][j] = (ret.a[i][j] + (long long)a.a[i][k] * b.a[k][j]) % mod;
  return ret;
}
bool operator==(const matrix &a, const matrix &b) {
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 2; j++)
      if (a.a[i][j] != b.a[i][j]) return false;
  return true;
}
matrix seg[300111];
void modify(int p, const matrix &v, int tl, int tr, int t) {
  if (tl == tr) {
    seg[t] = v;
    return;
  }
  int mid = (tl + tr) >> 1;
  if (p <= mid)
    modify(p, v, tl, mid, (t << 1));
  else
    modify(p, v, mid + 1, tr, ((t << 1) | 1));
  seg[t] = seg[(t << 1)] * seg[((t << 1) | 1)];
}
bool cmp(const pair<int, int> &a, const pair<int, int> &b) {
  return (long long)a.first * b.second < (long long)a.second * b.first;
}
bool cmp2(const pair<pair<int, int>, int> &a,
          const pair<pair<int, int>, int> &b) {
  return cmp(a.first, b.first);
}
bool eq(const pair<int, int> &a, const pair<int, int> &b) {
  return (long long)a.first * b.second == (long long)a.second * b.first;
}
int x[maxn], p[maxn], v[maxn], n;
void setv(int pos, pair<int, int> t) {
  matrix cur;
  cur.a[0][1] = 1;
  if (cmp(t, make_pair(x[pos + 1] - x[pos], abs(v[pos + 1] - v[pos]))))
    cur.a[0][0] = cur.a[1][1] = 1;
  else {
    cur.a[0][0] = (v[pos + 1] <= v[pos]);
    cur.a[1][1] = (v[pos + 1] >= v[pos]);
  }
  if (cmp(t, make_pair(x[pos + 1] - x[pos], v[pos + 1] + v[pos])))
    cur.a[1][0] = 1;
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 2; j++) {
      if (j == 0)
        cur.a[i][j] = (long long)cur.a[i][j] * (mod + 1 - p[pos + 1]) % mod;
      else
        cur.a[i][j] = (long long)cur.a[i][j] * p[pos + 1] % mod;
    }
  modify(pos, cur, 1, n - 1, 1);
}
int calc() {
  int prob = 0;
  matrix cur = seg[1];
  for (int j = 0; j < 2; j++)
    for (int k = 0; k < 2; k++) {
      int coef = cur.a[j][k];
      if (j == 0)
        coef = (long long)coef * (mod + 1 - p[1]) % mod;
      else
        coef = (long long)coef * p[1] % mod;
      prob += coef;
      if (prob >= mod) prob -= mod;
    }
  return prob;
}
int main() {
  get_int(n);
  for (int i = 1; i <= n; i++) {
    (get_int(x[i]) && (get_int(v[i]) && get_int(p[i])));
    p[i] = (long long)p[i] * qpow(100, mod - 2) % mod;
  }
  vector<pair<pair<int, int>, int> > vs;
  for (int pos = 1; pos < n; pos++) {
    if (v[pos] != v[pos + 1])
      vs.push_back(make_pair(
          make_pair(x[pos + 1] - x[pos], abs(v[pos + 1] - v[pos])), pos));
    vs.push_back(
        make_pair(make_pair(x[pos + 1] - x[pos], v[pos + 1] + v[pos]), pos));
    vs.push_back(make_pair(make_pair(2000000001, 1), pos));
  }
  sort(vs.begin(), vs.end(), cmp2);
  pair<int, int> cur = make_pair(0, 1);
  for (int i = 1; i < n; i++) setv(i, cur);
  int ans = 0, last = calc();
  for (int i = 0, nxt = 0; i < (int)vs.size(); i = nxt) {
    for (; nxt < (int)vs.size() && eq(vs[i].first, vs[nxt].first); nxt++)
      ;
    for (int j = i; j < nxt; j++) setv(vs[j].second, vs[j].first);
    int prob = calc();
    ans = (ans + (long long)(last - prob + mod) * vs[i].first.first % mod *
                     qpow(vs[i].first.second, mod - 2)) %
          mod;
    cur = vs[i].first;
    last = prob;
  }
  print_int(ans), puts("");
  return 0;
}
