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 <typename Tp>
inline void outarr(Tp _begin, Tp _end, const char* _delim = " ") {
  for (Tp current = _begin; current != _end; ++current) {
    std::cout << *current << _delim;
  }
  std::cout << '\n';
}
using ll = long long;
using pii = std::pair<int, int>;
constexpr int INF = 0x3f3f3f3f;
constexpr int MOD = static_cast<const int>(1e9 + 7);
constexpr int g_mod = 998244353;
constexpr int MAXN = 200000;
class SegmentTree {
 public:
  struct Node {
    int Val = 0;
    int Push = -1;
  };
  explicit SegmentTree(int n) : size(n), tree(size << 2) {}
  void Update(int l, int r, int x) { UpdateImpl(0, 0, size - 1, l, r, x); }
  int Get(int i) { return GetImpl(0, 0, size - 1, i); }

 private:
  int Left(int v) const { return (v << 1) + 1; }
  int Right(int v) const { return (v << 1) + 2; }
  void Modify(int v, int x) {
    tree[v].Val = x;
    tree[v].Push = x;
  }
  void Push(int v) {
    if (tree[v].Push != -1) {
      for (int u : {Left(v), Right(v)}) {
        Modify(u, tree[v].Push);
      }
      tree[v].Push = -1;
    }
  }
  void UpdateImpl(int v, int tl, int tr, int l, int r, int x) {
    if (l > r) {
      return;
    }
    if (tl == l && r == tr) {
      Modify(v, x);
      return;
    }
    Push(v);
    int mid = (tl + tr) >> 1;
    UpdateImpl(Left(v), tl, mid, l, min(mid, r), x);
    UpdateImpl(Right(v), mid + 1, tr, max(mid + 1, l), r, x);
  }
  int GetImpl(int v, int tl, int tr, int i) {
    if (tl == tr) {
      return tree[v].Val;
    }
    Push(v);
    int mid = (tl + tr) >> 1;
    if (i <= mid) {
      return GetImpl(Left(v), tl, mid, i);
    }
    return GetImpl(Right(v), mid + 1, tr, i);
  }
  int size;
  vector<Node> tree;
};
int inv[101];
int prob[MAXN];
int inv_p[MAXN];
bool is_checkpoint[MAXN];
int pref[MAXN];
int Add(int x, int y) {
  x += y;
  return x < g_mod ? x : x - g_mod;
}
int Sub(int x, int y) {
  x -= y;
  return x >= 0 ? x : x + g_mod;
}
int Mul(int x, int y) { return int(1LL * x * y % g_mod); }
int FastPow(int x, int p) {
  int res = 1;
  while (p > 0) {
    if (p & 1) {
      res = Mul(res, x);
    }
    p >>= 1;
    x = Mul(x, x);
  }
  return res;
}
int Inv(int x) { return FastPow(x, g_mod - 2); }
void Init() {
  is_checkpoint[0] = true;
  for (int i = 1; i <= 100; ++i) {
    inv[i] = Inv(i);
  }
}
namespace st {
int tree[MAXN << 2];
int tree_push[MAXN << 2];
int Left(int v) { return (v << 1) + 1; }
int Right(int v) { return (v << 1) + 2; }
void UpdateVertex(int v) { tree[v] = Add(tree[Left(v)], tree[Right(v)]); }
void Modify(int v, int x) {
  tree[v] = Mul(tree[v], x);
  tree_push[v] = Mul(tree_push[v], x);
}
void Push(int v) {
  if (tree_push[v] != 1) {
    for (int u : {Left(v), Right(v)}) {
      Modify(u, tree_push[v]);
    }
    tree_push[v] = 1;
  }
}
void BuildImpl(int v, int tl, int tr, int* arr) {
  tree_push[v] = 1;
  if (tl == tr) {
    tree[v] = *(arr + tl);
    return;
  }
  int mid = (tl + tr) >> 1;
  BuildImpl(Left(v), tl, mid, arr);
  BuildImpl(Right(v), mid + 1, tr, arr);
  UpdateVertex(v);
}
void Build(int* arr, int n) { BuildImpl(0, 0, n - 1, arr); }
void UpdateImpl(int v, int tl, int tr, int l, int r, int x) {
  if (l > r) {
    return;
  }
  if (tl == l && r == tr) {
    Modify(v, x);
    return;
  }
  Push(v);
  int mid = (tl + tr) >> 1;
  UpdateImpl(Left(v), tl, mid, l, min(mid, r), x);
  UpdateImpl(Right(v), mid + 1, tr, max(mid + 1, l), r, x);
  UpdateVertex(v);
}
void Update(int l, int r, int x, int n) { UpdateImpl(0, 0, n - 1, l, r, x); }
int Query() { return tree[0]; }
int Query(int v, int tl, int tr, int l, int r) {
  if (l > r) {
    return 0;
  }
  if (tl == l && r == tr) {
    return tree[v];
  }
  Push(v);
  int mid = (tl + tr) >> 1;
  return Add(Query(Left(v), tl, mid, l, min(mid, r)),
             Query(Right(v), mid + 1, tr, max(mid + 1, l), r));
}
}  // namespace st
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  Init();
  int n, q;
  cin >> n >> q;
  for (int i = 0; i < (n); ++i) {
    cin >> prob[i];
    inv_p[i] = Mul(100, inv[prob[i]]);
    prob[i] = Mul(prob[i], inv[100]);
  }
  int curp = 1;
  for (int i = n - 1; i >= 0; --i) {
    curp = Mul(curp, inv_p[i]);
    pref[i] = curp;
  }
  SegmentTree head(n);
  SegmentTree tail(n);
  tail.Update(0, n - 1, n - 1);
  st::Build(pref, n);
  while (q--) {
    int j;
    cin >> j;
    --j;
    is_checkpoint[j] ^= true;
    if (is_checkpoint[j]) {
      int h = head.Get(j);
      int t = tail.Get(j);
      head.Update(j, t, j);
      tail.Update(h, j - 1, j - 1);
      st::Update(h, j - 1, Inv(st::Query(0, 0, n - 1, j, j)), n);
    } else {
      int h = head.Get(j - 1);
      int t = tail.Get(j);
      head.Update(j, t, h);
      tail.Update(h, j - 1, t);
      st::Update(h, j - 1, st::Query(0, 0, n - 1, j, j), n);
    }
    cout << st::Query() << "\n";
  }
  return 0;
}