Problem: Creatnx has n mirrors, numbered from 1 to n. Every day, Creatnx asks exactly one mirror "Am I beautiful?". The i-th mirror will tell Creatnx that he is beautiful with probability (p_i)/(100) for all 1 ≤ i ≤ n.

Some mirrors are called checkpoints. Initially, only the 1st mirror is a checkpoint. It remains a checkpoint all the time.

Creatnx asks the mirrors one by one, starting from the 1-st mirror. Every day, if he asks i-th mirror, there are two possibilities:

  * The i-th mirror tells Creatnx that he is beautiful. In this case, if i = n Creatnx will stop and become happy, otherwise he will continue asking the i+1-th mirror next day; 
  * In the other case, Creatnx will feel upset. The next day, Creatnx will start asking from the checkpoint with a maximal number that is less or equal to i. 



There are some changes occur over time: some mirrors become new checkpoints and some mirrors are no longer checkpoints. You are given q queries, each query is represented by an integer u: If the u-th mirror isn't a checkpoint then we set it as a checkpoint. Otherwise, the u-th mirror is no longer a checkpoint.

After each query, you need to calculate [the expected number](https://en.wikipedia.org/wiki/Expected_value) of days until Creatnx becomes happy.

Each of this numbers should be found by modulo 998244353. Formally, let M = 998244353. It can be shown that the answer can be expressed as an irreducible fraction p/q, where p and q are integers and q not ≡ 0 \pmod{M}. Output the integer equal to p ⋅ q^{-1} mod M. In other words, output such an integer x that 0 ≤ x < M and x ⋅ q ≡ p \pmod{M}.

Input

The first line contains two integers n, q (2 ≤ n, q ≤ 2 ⋅ 10^5) — the number of mirrors and queries.

The second line contains n integers: p_1, p_2, …, p_n (1 ≤ p_i ≤ 100).

Each of q following lines contains a single integer u (2 ≤ u ≤ n) — next query.

Output

Print q numbers – the answers after each query by modulo 998244353.

Examples

Input


2 2
50 50
2
2


Output


4
6


Input


5 5
10 20 30 40 50
2
3
4
5
3


Output


117
665496274
332748143
831870317
499122211

Note

In the first test after the first query, the first and the second mirrors are checkpoints. Creatnx will ask the first mirror until it will say that he is beautiful, after that he will ask the second mirror until it will say that he is beautiful because the second mirror is a checkpoint. After that, he will become happy. Probabilities that the mirrors will say, that he is beautiful are equal to 1/2. So, the expected number of days, until one mirror will say, that he is beautiful is equal to 2 and the answer will be equal to 4 = 2 + 2.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <typename T, typename S>
ostream &operator<<(ostream &os, const pair<T, S> &p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <typename C, typename T = decay<decltype(*begin(declval<C>()))>,
          typename enable_if<!is_same<C, string>::value>::type * = nullptr>
ostream &operator<<(ostream &os, const C &c) {
  bool f = true;
  os << "[";
  for (const auto &x : c) {
    if (!f) os << ", ";
    f = false;
    os << x;
  }
  return os << "]";
}
template <typename T>
void debug(string s, T x) {
  cerr << s << " = " << x << "\n";
}
template <typename T, typename... Args>
void debug(string s, T x, Args... args) {
  for (int i = 0, b = 0; i < (int)s.size(); i++)
    if (s[i] == '(' || s[i] == '{')
      b++;
    else if (s[i] == ')' || s[i] == '}')
      b--;
    else if (s[i] == ',' && b == 0) {
      cerr << s.substr(0, i) << " = " << x << " | ";
      debug(s.substr(s.find_first_not_of(' ', i + 1)), args...);
      break;
    }
}
template <int MOD>
struct ModInt {
  long long v;
  ModInt(long long _v = 0) {
    v = (-MOD < _v && _v < MOD) ? _v : _v % MOD;
    if (v < 0) v += MOD;
  }
  ModInt &operator+=(const ModInt &other) {
    v += other.v;
    if (v >= MOD) v -= MOD;
    return *this;
  }
  ModInt &operator-=(const ModInt &other) {
    v -= other.v;
    if (v < 0) v += MOD;
    return *this;
  }
  ModInt &operator*=(const ModInt &other) {
    v = v * other.v % MOD;
    return *this;
  }
  ModInt &operator/=(const ModInt &other) { return *this *= inverse(other); }
  bool operator==(const ModInt &other) const { return v == other.v; }
  bool operator!=(const ModInt &other) const { return v != other.v; }
  friend ModInt operator+(ModInt a, const ModInt &b) { return a += b; }
  friend ModInt operator-(ModInt a, const ModInt &b) { return a -= b; }
  friend ModInt operator*(ModInt a, const ModInt &b) { return a *= b; }
  friend ModInt operator/(ModInt a, const ModInt &b) { return a /= b; }
  friend ModInt operator-(const ModInt &a) { return 0 - a; }
  friend ModInt power(ModInt a, long long b) {
    ModInt ret(1);
    while (b > 0) {
      if (b & 1) ret *= a;
      a *= a;
      b >>= 1;
    }
    return ret;
  }
  friend ModInt inverse(ModInt a) { return power(a, MOD - 2); }
  friend ostream &operator<<(ostream &os, const ModInt &m) { return os << m.v; }
};
struct Node {
  ModInt<998244353> ac, am, bc, bm;
  void leaf(ModInt<998244353> p) {
    ac = 1;
    am = bm = p;
    bc = 1 - p;
  }
  void pull(Node &a, Node &b) {
    ac = a.ac + a.am * b.ac;
    am = a.am * b.am;
    bc = a.bc + a.bm * b.bc;
    bm = a.bm * b.bm;
  }
};
struct SegmentTree {
  int n;
  vector<ModInt<998244353> > a;
  vector<Node> st;
  SegmentTree(int _n) : n(_n), st(4 * n) { build(1, 0, n - 1); }
  SegmentTree(const vector<ModInt<998244353> > &_a)
      : n((int)_a.size()), a(_a), st(4 * n) {
    build(1, 0, n - 1);
  }
  void build(int p, int l, int r) {
    if (l == r) {
      st[p].leaf(a[l]);
      return;
    }
    int m = (l + r) / 2;
    build(2 * p, l, m);
    build(2 * p + 1, m + 1, r);
    st[p].pull(st[2 * p], st[2 * p + 1]);
  }
  Node query(int p, int l, int r, int i, int j) {
    if (l == i && r == j) return st[p];
    int m = (l + r) / 2;
    if (j <= m)
      return query(2 * p, l, m, i, j);
    else if (i > m)
      return query(2 * p + 1, m + 1, r, i, j);
    Node ret, ls = query(2 * p, l, m, i, m),
              rs = query(2 * p + 1, m + 1, r, m + 1, j);
    ret.pull(ls, rs);
    return ret;
  }
  Node query(int i, int j) { return query(1, 0, n - 1, i, j); }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, q;
  cin >> n >> q;
  vector<ModInt<998244353> > p(n);
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    p[i] = ModInt<998244353>(x) / 100;
  }
  SegmentTree st(p);
  auto query = [&](int l, int r) -> ModInt<998244353> {
    Node cur = st.query(l, r - 1);
    return cur.ac / (1 - cur.bc);
  };
  set<int> ckpt{0, n};
  ModInt<998244353> ret = query(0, n);
  for (int i = 0; i < q; i++) {
    int u;
    cin >> u;
    u--;
    auto [it, b] = ckpt.insert(u);
    if (b) {
      ret += query(*prev(it), u) + query(u, *next(it)) -
             query(*prev(it), *next(it));
    } else {
      ret += query(*prev(it), *next(it)) - query(*prev(it), u) -
             query(u, *next(it));
      ckpt.erase(it);
    }
    cout << ret << "\n";
  }
  return 0;
}