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;
const int inf = (int)1.01e9;
const long long infll = (long long)1.01e18;
const long double eps = 1e-9;
const long double pi = acos((long double)-1);
mt19937 mrand(chrono::steady_clock::now().time_since_epoch().count());
int rnd(int x) { return mrand() % x; }
void precalc() {}
const int mod = 998244353;
int mul(int a, int b) { return (long long)a * b % mod; }
void add(int &a, int b) {
  a += b;
  if (a >= mod) {
    a -= mod;
  }
}
pair<int, int> gcd(int a, int b) {
  if (!b) {
    return make_pair(1, 0);
  }
  pair<int, int> p = gcd(b, a % b);
  return make_pair(p.second, p.first - (a / b) * p.second);
}
int inv(int x) {
  int res = gcd(x, mod).first % mod;
  if (res < 0) {
    res += mod;
  }
  return res;
}
const int inv100 = inv(100);
const int maxn = (int)2e5 + 5;
int n, q;
int p[maxn];
bool read() {
  if (scanf("%d%d", &n, &q) < 2) {
    return false;
  }
  for (int i = 0; i < n; i++) {
    scanf("%d", &p[i]);
    p[i] = mul(p[i], inv100);
  }
  return true;
}
int st[4 * maxn][3];
void calc(int x[3], int y[3], int z[3]) {
  int tomul = y[1];
  x[0] = y[0];
  add(x[0], mul(z[0], tomul));
  x[1] = mul(z[1], tomul);
  x[2] = y[2];
  add(x[2], mul(z[2], tomul));
}
void buildst(int v, int tl, int tr) {
  if (tl == tr - 1) {
    st[v][0] = 1;
    st[v][1] = p[tl];
    st[v][2] = 1;
    add(st[v][2], mod - p[tl]);
    return;
  }
  int tm = (tl + tr) / 2;
  buildst(2 * v, tl, tm);
  buildst(2 * v + 1, tm, tr);
  calc(st[v], st[2 * v], st[2 * v + 1]);
}
void get(int v, int tl, int tr, int l, int r, int x[3]) {
  if (l == tl && r == tr) {
    int nx[3];
    calc(nx, st[v], x);
    for (int i = 0; i < 3; i++) {
      x[i] = nx[i];
    }
    return;
  }
  int tm = (tl + tr) / 2;
  if (r > tm) {
    get(2 * v + 1, tm, tr, max(l, tm), r, x);
  }
  if (l < tm) {
    get(2 * v, tl, tm, l, min(r, tm), x);
  }
}
int solveSeg(int l, int r) {
  int x[3] = {0, 0, 0};
  get(1, 0, n, l, r, x);
  int todiv = 1;
  add(todiv, mod - x[2]);
  return mul(x[0], inv(todiv));
}
set<int> cp;
void solve() {
  buildst(1, 0, n);
  cp.clear();
  cp.insert(0);
  cp.insert(n);
  int res = solveSeg(0, n);
  for (int qq = 0; qq < q; qq++) {
    int i;
    scanf("%d", &i);
    i--;
    if (cp.count(i)) {
      auto it = cp.find(i);
      auto lit = it, rit = it;
      lit--;
      rit++;
      add(res, mod - solveSeg(*lit, i));
      add(res, mod - solveSeg(i, *rit));
      add(res, solveSeg(*lit, *rit));
      cp.erase(it);
    } else {
      auto rit = cp.lower_bound(i);
      auto lit = rit;
      lit--;
      add(res, mod - solveSeg(*lit, *rit));
      add(res, solveSeg(*lit, i));
      add(res, solveSeg(i, *rit));
      cp.insert(rit, i);
    }
    printf("%d\n", res);
  }
}
int main() {
  precalc();
  while (read()) {
    solve();
  }
  return 0;
}