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 <class T>
inline bool is_odd(const T& x) {
  return x & T(1) != T(0);
}
template <class T>
inline bool is_negative(const T& x) {
  return x < T(0);
}
template <class T>
inline bool is_zero(const T& x) {
  return x == T(0);
}
template <class T>
pair<T, T> extended_stein_gcd(const T& x0, const T& y0) {
  T x(x0), y(y0), ax(1), ay(0);
  if (is_negative(x)) {
    x = -x;
  } else if (is_zero(x)) {
    return pair<T, T>(T(0), T(1));
  }
  if (is_negative(y)) {
    y = -y;
  } else if (is_zero(y)) {
    return pair<T, T>(T(1), T(0));
  }
  while (!is_odd(x) && !is_odd(y)) {
    x >>= 1;
    y >>= 1;
  }
  int dx = 0, dy = 0;
  while (!is_odd(x)) {
    x >>= 1;
    ++dx;
  }
  while (!is_odd(y)) {
    y >>= 1;
    ++dy;
  }
  T x1(x), y1(y);
  while (x != y) {
    while (x > y) {
      x -= y;
      ax -= ay;
      while (!is_odd(x)) {
        x >>= 1;
        ax = (is_odd(ax) ? ((ax + y1) >> 1) : (ax >> 1));
      }
    }
    while (y > x) {
      y -= x;
      ay -= ax;
      while (!is_odd(y)) {
        y >>= 1;
        ay = (is_odd(ay) ? ((ay + y1) >> 1) : (ay >> 1));
      }
    }
  }
  if (dy == 0) {
    x1 <<= dx;
    while (dx--) {
      ax = (is_odd(ax) ? ((ax + y1) >> 1) : (ax >> 1));
    }
    y1 <<= dy;
    return pair<T, T>(ax, (x - ax * x1) / y1);
  } else {
    T bx = (x - ax * x1) / y1;
    y1 <<= dy;
    while (dy--) {
      bx = (is_odd(bx) ? ((bx + x1) >> 1) : (bx >> 1));
    }
    x1 <<= dx;
    return pair<T, T>((x - bx * y1) / x1, bx);
  }
}
int main() {
  const long long p = 998244353;
  long long E = 0;
  long long n, P;
  scanf("%lld", &n);
  while (n--) {
    scanf("%lld", &P);
    E = ((E + 1) * extended_stein_gcd(p, P).second) % p;
    E = (100 * (p + E)) % p;
  }
  printf("%lld\n", E);
}