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;
int n, q;
using ll = long long;
const ll base = 998244353;
ll power(ll x, ll y) {
  if (y == 0) return 1;
  ll t = power(x, y / 2);
  (t *= t) %= base;
  if (y % 2) (t *= x) %= base;
  return t;
}
const ll inv = power(100, base - 2);
ll p[200001];
class matrix {
 public:
  ll f[3][3];
  matrix operator*(matrix x) {
    matrix res;
    for (int i = 0; i < 3; i++)
      for (int j = 0; j < 3; j++) {
        res.f[i][j] = 0;
        for (int k = 0; k < 3; k++) res.f[i][j] += f[i][k] * x.f[k][j];
        res.f[i][j] %= base;
      }
    return res;
  }
  void set(ll p) {
    f[0][0] = f[1][1] = p;
    f[0][1] = f[0][2] = f[1][0] = f[1][2] = 0;
    f[2][0] = (base + 1 - p) % base;
    f[2][1] = f[2][2] = 1;
  }
  void make_unit() {
    for (int i = 0; i < 3; i++)
      for (int j = 0; j < 3; j++) f[i][j] = i == j;
  }
  void make_spec() {
    for (int i = 0; i < 3; i++)
      for (int j = 0; j < 3; j++) f[i][j] = 0;
    f[0][2] = 1;
  }
  ll extract() {
    return (f[0][1] * power(base + 1 - f[0][0], base - 2)) % base;
  }
};
matrix unit;
matrix spec;
class segment_tree {
 public:
  using pointer = segment_tree*;
  matrix a;
  int l, r, m;
  pointer left, right;
  segment_tree(int l, int r) : l(l), r(r) {
    m = (l + r) / 2;
    if (l != r) {
      left = new segment_tree(l, m);
      right = new segment_tree(m + 1, r);
      a = right->a * left->a;
    } else {
      left = right = nullptr;
      a.set(p[l]);
    }
  }
  matrix get(int u, int v) {
    if (l > v || r < u) return unit;
    if (u <= l && v >= r) return a;
    if (m < u) return right->get(u, v);
    if (m >= v) return left->get(u, v);
    return right->get(u, v) * left->get(u, v);
  }
};
segment_tree::pointer tree;
set<int> key;
ll ans = 0;
matrix get_mat(int l, int r) { return spec * tree->get(l, r); }
map<pair<int, int>, ll> M;
ll get(int l, int r) {
  auto it = M.find(make_pair(l, r));
  if (it != M.end()) return it->second;
  return M[make_pair(l, r)] = get_mat(l, r).extract();
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  unit.make_unit();
  spec.make_spec();
  cin >> n >> q;
  for (int i = 1; i <= n; i++) cin >> p[i];
  for (int i = 1; i <= n; i++) (p[i] *= inv) %= base;
  tree = new segment_tree(1, n);
  key.insert(1);
  key.insert(n + 1);
  ans = get(1, n);
  for (int i = 1, x; i <= q; i++) {
    cin >> x;
    auto it = key.find(x);
    if (it == key.end()) {
      auto phigh = key.upper_bound(x);
      auto plow = phigh;
      plow--;
      int low = *plow;
      int high = *phigh;
      ans -= get(low, high - 1);
      ans += get(low, x - 1);
      ans += get(x, high - 1);
      key.insert(x);
    } else {
      auto phigh = it;
      auto plow = it;
      plow--;
      phigh++;
      int low = *plow;
      int high = *phigh;
      ans += get(low, high - 1);
      ans -= get(low, x - 1);
      ans -= get(x, high - 1);
      key.erase(it);
    }
    ans %= base;
    if (ans < 0) ans += base;
    cout << ans << '\n';
  }
}