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 <int MOD>
struct Modular {
  int value;
  Modular(const Modular& k) : value(k.value) {}
  template <typename V>
  Modular(const V& v) : value(v % MOD) {
    if (value < 0) {
      value += MOD;
    }
  }
  Modular() : Modular(0) {}
  Modular& operator+=(Modular const& b) {
    value += b.value;
    if (value >= MOD) value -= MOD;
    return *this;
  }
  Modular& operator-=(Modular const& b) {
    value -= b.value;
    if (value < 0) value += MOD;
    return *this;
  }
  Modular& operator*=(Modular const& b) {
    value = (long long)value * b.value % MOD;
    return *this;
  }
  Modular& operator++() { return *this += 1; }
  Modular& operator--() { return *this -= 1; }
  Modular operator++(int) { return *this += 1; }
  Modular operator--(int) { return *this -= 1; }
  friend Modular inverse(Modular a) { return mexp(a, MOD - 2); }
  Modular& operator/=(Modular const& b) { return *this *= inverse(b); }
  friend Modular operator+(Modular a, Modular const b) { return a += b; }
  friend Modular operator-(Modular a, Modular const b) { return a -= b; }
  friend Modular operator-(Modular const a) { return 0 - a; }
  friend Modular operator*(Modular a, Modular const b) { return a *= b; }
  friend Modular operator/(Modular a, Modular const b) { return a /= b; }
  friend std::ostream& operator<<(std::ostream& os, Modular const& a) {
    return os << a.value;
  }
  friend bool operator==(Modular const& a, Modular const& b) {
    return a.value == b.value;
  }
  friend bool operator!=(Modular const& a, Modular const& b) {
    return a.value != b.value;
  }
};
template <int T, typename V>
Modular<T> mexp(Modular<T> a, V e) {
  if (a == 0) return e == 0 ? 1 : 0;
  Modular<T> res = 1;
  while (e) {
    if (e & 1) res *= a;
    a *= a;
    e >>= 1;
  }
  return res;
}
const int MAXN = 2.1e5;
const int MOD = 998244353;
using Mint = Modular<MOD>;
Mint t[4 * MAXN];
Mint lazy[4 * MAXN];
void Push(int n, int L, int R) {
  int M = (R + L) / 2;
  if (lazy[n] != 1) {
    lazy[2 * n] *= lazy[n];
    lazy[2 * n + 1] *= lazy[n];
    t[2 * n] *= lazy[n];
    t[2 * n + 1] *= lazy[n];
    lazy[n] = 1;
  }
}
void Put(int n, int lft, int rgt, int pt, Mint v) {
  int mid = (lft + rgt) / 2;
  if (lft == rgt) {
    t[n] = v;
    return;
  }
  if (pt <= mid) {
    Put(2 * n, lft, mid, pt, v);
  } else {
    Put(2 * n + 1, mid + 1, rgt, pt, v);
  }
  t[n] = t[2 * n] + t[2 * n + 1];
}
void Mul(int n, int lft, int rgt, int rs, int re, Mint v) {
  if (lft > re || rgt < rs) return;
  if (lft >= rs && rgt <= re) {
    t[n] *= v;
    lazy[n] *= v;
  } else {
    Push(n, lft, rgt);
    int mid = (lft + rgt) / 2;
    Mul(2 * n, lft, mid, rs, re, v);
    Mul(2 * n + 1, mid + 1, rgt, rs, re, v);
    t[n] = t[2 * n] + t[2 * n + 1];
  }
}
void Run() {
  fill(lazy, lazy + 4 * MAXN, 1);
  int n, qu;
  cin >> n >> qu;
  Mint inv = inverse(Mint(100));
  vector<Mint> prods(n + 1), p(n + 1);
  set<int> bounds{1, n + 1};
  prods[0] = 1;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    p[i] = Mint(x) * inv;
    prods[i] = p[i] * prods[i - 1];
  }
  Mint ii = 1;
  for (int i = n; i >= 1; i--) {
    ii *= inverse(p[i]);
    Put(1, 1, n, i, ii);
  }
  for (int q = 0; q < qu; q++) {
    int u;
    cin >> u;
    set<int>::iterator it;
    bool is_insertion;
    tie(it, is_insertion) = bounds.insert(u);
    int pr = *std::prev(it), ne = *std::next(it);
    if (!is_insertion) {
      Mul(1, 1, n, pr, u - 1, prods[u - 1] / prods[ne - 1]);
      bounds.erase(it);
    } else {
      Mul(1, 1, n, pr, u - 1, prods[ne - 1] / prods[u - 1]);
    }
    cout << t[1] << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  Run();
  return 0;
}