#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
const int MOD = 998244353;
int add(int a, int b) {
  int res = a + b;
  if (res >= MOD) {
    return res - MOD;
  } else {
    return res;
  }
}
int sub(int a, int b) {
  if (a - b < 0) {
    return a - b + MOD;
  } else {
    return a - b;
  }
}
int mul(int a, int b) { return ((long long)a * b) % MOD; }
int binpow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) {
      res = mul(res, a);
    }
    a = mul(a, a);
    b >>= 1;
  }
  return res;
}
int divv(int a, int b) { return mul(a, binpow(b, MOD - 2)); }
struct Proton {
  int x;
  int p;
  int v;
  Proton(int x_, int p_, int v_) {
    x = x_;
    p = p_;
    v = v_;
  }
  Proton() {}
};
struct Frac {
  int p;
  int q;
  Frac(int p_, int q_) {
    p = p_;
    q = q_;
  }
  bool operator<(const Frac &other) const {
    return (long long)p * other.q < (long long)other.p * q;
  }
  Frac() {}
};
struct Event {
  Frac time;
  int pos;
  int ban_mask;
  Event(Frac time_, int pos_, int ban_mask_) {
    time = time_;
    pos = pos_;
    ban_mask = ban_mask_;
  }
  bool operator<(const Event &other) const { return time < other.time; }
};
int is_ban[N][4];
int gm(int f, int s) { return f + 2 * s; }
struct Node {
  int l, r;
  vector<int> prob;
  friend Node conq(const Node &a, const Node &b) {
    if (a.l == -1 && a.r == -1) {
      return b;
    }
    if (b.l == -1 && b.r == -1) {
      return a;
    }
    vector<int> np(4);
    for (int f = 0; f < 4; f++) {
      for (int s = 0; s < 4; s++) {
        int nm = gm(f & 1, (s >> 1) & 1);
        int bm = gm((f >> 1) & 1, s & 1);
        if (!is_ban[b.l][bm]) {
          np[nm] = add(np[nm], mul(a.prob[f], b.prob[s]));
        }
      }
    }
    return Node(a.l, b.r, np);
  }
  Node() {
    l = -1;
    r = -1;
    prob.resize(4);
  }
  Node(int l_, int r_, vector<int> prob_) {
    l = l_;
    r = r_;
    prob = prob_;
  }
  Node(int p, int pos) {
    l = pos;
    r = pos;
    prob.resize(4);
    prob[gm(0, 0)] = p;
    prob[gm(1, 1)] = sub(1, p);
  }
};
namespace SegementTree {
int n;
Node t[4 * N];
void pull(int v) { t[v] = conq(t[2 * v + 1], t[2 * v + 2]); }
void query(int v, int l, int r, int pos) {
  if (l + 1 == r) {
    return;
  } else {
    int m = (r + l) >> 1;
    if (pos < m) {
      query(2 * v + 1, l, m, pos);
    } else {
      query(2 * v + 2, m, r, pos);
    }
    pull(v);
  }
}
void build(int v, int l, int r, vector<Proton> &p) {
  if (l + 1 == r) {
    t[v] = Node(p[l].p, l);
  } else {
    int m = (r + l) >> 1;
    build(2 * v + 1, l, m, p);
    build(2 * v + 2, m, r, p);
    pull(v);
  }
}
void add_ban(int pos, int ban_mask) {
  is_ban[pos][ban_mask] = 1;
  query(0, 0, n, pos);
}
void init(vector<Proton> &p) {
  n = (int)p.size();
  build(0, 0, n, p);
}
int get() {
  int ans = 0;
  for (int i = 0; i < 4; i++) {
    ans = add(ans, t[0].prob[i]);
  }
  return ans;
}
}  // namespace SegementTree
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<Proton> a(n);
  for (auto &t : a) {
    cin >> t.x >> t.v >> t.p;
    t.p = 100 - t.p;
    t.p = divv(t.p, 100);
  }
  vector<Event> events;
  for (int i = 0; i + 1 < n; i++) {
    int dx = a[i + 1].x - a[i].x;
    int dv = abs(a[i].v - a[i + 1].v);
    events.emplace_back(Frac(dx, a[i].v + a[i + 1].v), i + 1, gm(1, 0));
    int rm = -1;
    if (a[i].v < a[i + 1].v) {
      rm = gm(0, 0);
    } else if (a[i].v > a[i + 1].v) {
      rm = gm(1, 1);
    }
    if (rm != -1) {
      events.emplace_back(Frac(dx, dv), i + 1, rm);
    }
  }
  sort(events.begin(), events.end());
  vector<int> probs((int)events.size() + 1);
  probs[0] = 1;
  SegementTree::init(a);
  for (int i = 0; i < (int)events.size(); i++) {
    SegementTree::add_ban(events[i].pos, events[i].ban_mask);
    probs[i + 1] = SegementTree::get();
  }
  int ans = 0;
  for (int i = 0; i < (int)events.size(); i++) {
    int pr = sub(probs[i], probs[i + 1]);
    int rt = divv(events[i].time.p, events[i].time.q);
    ans = add(ans, mul(rt, pr));
  }
  cout << ans << endl;
}
