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>
#pragma GCC optimize("O3", "unroll-all-loops")
#pragma GCC target("avx2")
using namespace std;
template <class T, class U>
inline void checkmin(T &x, U y) {
  if (y < x) x = y;
}
template <class T, class U>
inline void checkmax(T &x, U y) {
  if (y > x) x = y;
}
template <class T, class U>
inline bool ifmax(T &x, U y) {
  if (y > x) return x = y, true;
  return false;
}
template <class T, class U>
inline bool ifmin(T &x, U y) {
  if (y < x) return x = y, true;
  return false;
}
template <class T>
inline void sort(T &a) {
  sort(a.begin(), a.end());
}
template <class T>
inline void rsort(T &a) {
  sort(a.rbegin(), a.rend());
}
template <class T>
inline void reverse(T &a) {
  reverse(a.begin(), a.end());
}
template <class T, class U>
inline istream &operator>>(istream &str, pair<T, U> &p) {
  return str >> p.first >> p.second;
}
template <class T>
inline istream &operator>>(istream &str, vector<T> &a) {
  for (auto &i : a) str >> i;
  return str;
}
template <class T>
inline T sorted(T a) {
  sort(a);
  return a;
}
struct zet {
  int val;
  zet(long long x = 0) {
    val = x % 998244353;
    if (val < 0) val += 998244353;
  }
  zet(long long a, long long b) {
    *this += a;
    *this /= b;
  }
  zet &operator+=(zet const &b) {
    val += b.val;
    if (val >= 998244353) val -= 998244353;
    return *this;
  }
  zet &operator-=(zet const &b) {
    val -= b.val;
    if (val < 0) val += 998244353;
    return *this;
  }
  zet &operator*=(zet const &b) {
    val = (val * (long long)b.val) % 998244353;
    return *this;
  }
  friend zet mypow(zet a, long long n) {
    zet res = 1;
    while (n) {
      if (n & 1) res *= a;
      a *= a;
      n >>= 1;
    }
    return res;
  }
  friend zet inv(zet a) { return mypow(a, 998244353 - 2); }
  zet &operator/=(zet const &b) { return *this *= inv(b); }
  friend zet operator+(zet a, const zet &b) { return a += b; }
  friend zet operator-(zet a, const zet &b) { return a -= b; }
  friend zet operator-(zet a) { return 0 - a; }
  friend zet operator*(zet a, const zet &b) { return a *= b; }
  friend zet operator/(zet a, const zet &b) { return a /= b; }
  friend istream &operator>>(istream &stream, zet &a) {
    return stream >> a.val;
  }
  friend ostream &operator<<(ostream &stream, const zet &a) {
    return stream << a.val;
  }
  friend bool operator==(zet const &a, zet const &b) { return a.val == b.val; }
  friend bool operator!=(zet const &a, zet const &b) { return a.val != b.val; }
  friend bool operator<(zet const &a, zet const &b) { return a.val < b.val; }
};
struct zethash {
  size_t operator()(const zet &z) const { return z.val; }
};
zet getsum(vector<zet> &sum, int l, int r) {
  if (l == 0) return sum[r];
  return sum[r] - sum[l - 1];
}
zet getsumsuff(vector<zet> &sum, vector<zet> &v, int l, int r) {
  if (r + 1 >= signed(v.size())) return getsum(sum, l, r);
  return getsum(sum, l, r) / v[r + 1];
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(12);
  srand(94385);
  int n, q;
  cin >> n >> q;
  vector<zet> p(n);
  cin >> p;
  for (auto &i : p) i /= 100, i = 1 / i;
  set<int> st = {0, n};
  vector<zet> suffp = p;
  for (int i = n - 2; i >= 0; --i) suffp[i] *= suffp[i + 1];
  vector<zet> prefsuffp = suffp;
  for (int i = 1; i < signed(prefsuffp.size()); ++i)
    prefsuffp[i] += prefsuffp[i - 1];
  zet sum = prefsuffp.back();
  while (q--) {
    int v;
    cin >> v;
    --v;
    if (st.count(v)) {
      auto it1 = st.find(v);
      auto it2 = it1, it0 = it1;
      ++it2;
      --it0;
      sum -= getsumsuff(prefsuffp, suffp, *it0, *it1 - 1);
      sum -= getsumsuff(prefsuffp, suffp, *it1, *it2 - 1);
      st.erase(it1);
      sum += getsumsuff(prefsuffp, suffp, *it0, *it2 - 1);
    } else {
      auto it2 = st.lower_bound(v);
      auto it0 = it2;
      --it0;
      sum -= getsumsuff(prefsuffp, suffp, *it0, *it2 - 1);
      st.insert(v);
      sum += getsumsuff(prefsuffp, suffp, *it0, v - 1);
      sum += getsumsuff(prefsuffp, suffp, v, *it2 - 1);
    }
    cout << sum << '\n';
  }
  return 0;
}