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>
template <class T>
inline void read(T &x) {
  x = 0;
  register char c = getchar();
  register bool f = 0;
  while (!isdigit(c)) f ^= c == '-', c = getchar();
  while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
  if (f) x = -x;
}
template <class T>
inline void print(T x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) print(x / 10);
  putchar(x % 10 + '0');
}
template <class T>
inline void print(T x, char c) {
  print(x), putchar(c);
}
const int N = 2e5 + 10, mod = 998244353;
struct z {
  int x;
  z(int x = 0) : x(x) {}
  friend inline z operator*(z a, z b) { return (long long)a.x * b.x % mod; }
  friend inline z operator-(z a, z b) {
    return (a.x -= b.x) < 0 ? a.x + mod : a.x;
  }
  friend inline z operator+(z a, z b) {
    return (a.x += b.x) >= mod ? a.x - mod : a.x;
  }
} inv100, p[N];
inline z fpow(z a, int b) {
  z s(1);
  for (; b; b >>= 1, a = a * a)
    if (b & 1) s = s * a;
  return s;
}
struct pair {
  z x, y;
  inline z set(z k) { return x * k + y; }
  friend inline pair operator*(const pair &x, const pair &y) {
    return (pair){x.x * y.x, x.x * y.y + x.y};
  }
};
struct seg {
  struct node {
    int l, r, mid;
    pair x;
  } p[N << 2];
  void build(int u, int l, int r, pair foo(int)) {
    p[u].l = l, p[u].r = r, p[u].mid = (l + r) >> 1;
    if (l == r) {
      p[u].x = foo(l);
      return;
    }
    build(u << 1, l, p[u].mid, foo);
    build(u << 1 | 1, p[u].mid + 1, r, foo);
    p[u].x = p[u << 1].x * p[u << 1 | 1].x;
  }
  void modify(int u, int k, pair x) {
    if (p[u].l == p[u].r) {
      p[u].x = x;
      return;
    }
    modify(k <= p[u].mid ? u << 1 : u << 1 | 1, k, x);
    p[u].x = p[u << 1].x * p[u << 1 | 1].x;
  }
  pair query(int u, int l, int r) {
    if (p[u].l == l && p[u].r == r) return p[u].x;
    if (r <= p[u].mid) return query(u << 1, l, r);
    if (l > p[u].mid) return query(u << 1 | 1, l, r);
    return query(u << 1, l, p[u].mid) * query(u << 1 | 1, p[u].mid + 1, r);
  }
} f, g, h, res;
int n, m;
std::set<int> set;
pair calc(int l, int r) {
  z a = f.query(1, l, r).set(0);
  z b = g.query(1, l, r).set(1);
  z c = h.query(1, l, r).set(0);
  z inv = fpow(1 - a, mod - 2);
  return (pair){b * inv, c * inv};
}
int main() {
  read(n), read(m), p[0] = 1, inv100 = fpow(100, mod - 2);
  for (int i = 1; i <= n; i++) read((int &)p[i]), p[i] = p[i] * inv100;
  set.insert(0), set.insert(1), set.insert(n + 1);
  f.build(1, 0, n, [](int i) { return (pair){p[i], 1 - p[i]}; });
  g.build(1, 0, n, [](int i) { return (pair){p[i], z(0)}; });
  h.build(1, 0, n, [](int i) { return (pair){p[i], z(1)}; });
  res.build(1, 0, n, [](int k) {
    if (k == 0) return calc(0, 0);
    if (k == 1) return calc(1, n);
    return (pair){1, 0};
  });
  for (int x, i = 1; i <= m; i++) {
    read(x);
    if (set.find(x) == set.end()) {
      set.insert(x);
      auto it = set.find(x);
      int l = *std::prev(it), r = *std::next(it);
      res.modify(1, l, calc(l, x - 1));
      res.modify(1, x, calc(x, r - 1));
    } else {
      auto it = set.find(x);
      int l = *std::prev(it), r = *std::next(it);
      res.modify(1, l, calc(l, r - 1));
      res.modify(1, x, {1, 0});
      set.erase(it);
    }
    printf("%d\n", (res.query(1, 0, n).set(0) - 1).x);
  }
}