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;
using ll = long long;
using ld = long double;
using db = double;
using str = string;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
using pd = pair<db, db>;
using vi = vector<int>;
using vb = vector<bool>;
using vl = vector<ll>;
using vd = vector<db>;
using vs = vector<str>;
using vpi = vector<pi>;
using vpl = vector<pl>;
using vpd = vector<pd>;
template <class T>
using V = vector<T>;
template <class T, size_t SZ>
using AR = array<T, SZ>;
template <class T>
using PR = pair<T, T>;
const int MOD = 998244353;
const int mxN = 2e5 + 5;
const ll INF = 1e18;
const ld PI = acos((ld)-1);
const int tSZ = (1 << 21);
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count());
constexpr int pcnt(int x) { return __builtin_popcount(x); }
constexpr int bits(int x) { return 31 - __builtin_clz(x); }
ll cdiv(ll a, ll b) { return a / b + ((a ^ b) > 0 && a % b); }
ll fdiv(ll a, ll b) { return a / b - ((a ^ b) < 0 && a % b); }
ll add(ll first, ll second) {
  first += second;
  if (first >= MOD) first %= MOD;
  if (first < 0) first += MOD;
  return first;
}
ll mul(ll first, ll second) {
  first *= second;
  if (first >= MOD) first %= MOD;
  return first;
}
ll pw(ll x, ll y) {
  ll ans = 1, ml = x;
  while (y) {
    if (y & 1) ans = mul(ans, ml);
    ml = mul(ml, ml);
    y >>= 1;
  }
  return ans;
}
ll inv(ll x) { return pw(x, MOD - 2); }
template <class T>
void remDup(vector<T>& x) {
  sort(begin(x), end(x));
  x.erase(unique(begin(x), end(x)), end(x));
}
template <class T, class U>
void erase(T& x, const U& v) {
  auto it = x.find(v);
  assert(it != end(x));
  x.erase(v);
}
template <class T>
void re(complex<T>& c);
template <class T, class U>
void re(pair<T, U>& p);
template <class T>
void re(vector<T>& v);
template <class T, size_t SZ>
void re(array<T, SZ>& a);
template <class T>
void re(T& x) {
  cin >> x;
}
void re(db& d) {
  str t;
  re(t);
  d = stod(t);
}
void re(ld& d) {
  str t;
  re(t);
  d = stold(t);
}
template <class T, class... U>
void re(T& t, U&... u) {
  re(t);
  re(u...);
}
template <class T>
void re(complex<T>& c) {
  T a, b;
  re(a, b);
  c = {a, b};
}
template <class T, class U>
void re(pair<T, U>& p) {
  re(p.first, p.second);
}
template <class T>
void re(vector<T>& x) {
  for (auto& a : x) re(a);
}
template <class T, size_t SZ>
void re(array<T, SZ>& x) {
  for (auto& a : x) re(a);
}
template <class T>
void rv(int& n, vector<T>& x) {
  re(n);
  x.resize(n);
  for (auto& a : x) re(a);
}
str to_string(char c) { return str(1, c); }
str to_string(const char* second) { return (str)second; }
str to_string(str second) { return second; }
str to_string(bool b) { return to_string((int)b); }
template <class T>
str to_string(complex<T> c) {
  stringstream ss;
  ss << c;
  return ss.str();
}
str to_string(vector<bool> v) {
  str res = "{";
  for (int i = (0); i < ((int)(v).size()); i++) res += char('0' + v[i]);
  res += "}";
  return res;
}
template <size_t SZ>
str to_string(bitset<SZ> b) {
  str res = "";
  for (int i = (0); i < (SZ); i++) res += char('0' + b[i]);
  return res;
}
template <class T, class U>
str to_string(pair<T, U> p);
template <class T>
str to_string(T v) {
  bool fst = 1;
  str res = "";
  for (const auto& x : v) {
    if (!fst) res += " ";
    fst = 0;
    res += to_string(x);
  }
  return res;
}
template <class T, class U>
str to_string(pair<T, U> p) {
  return to_string(p.first) + " " + to_string(p.second);
}
template <class T>
void pr(T v) {
  cout << to_string(v);
}
template <class T, class... U>
void pr(const T& t, const U&... u) {
  pr(t);
  pr(u...);
}
void ps() { pr("\n"); }
template <class T, class... U>
void ps(const T& t, const U&... u) {
  pr(t);
  if (sizeof...(u)) pr(" ");
  ps(u...);
}
void setIn(str second) { freopen(second.c_str(), "r", stdin); }
void setOut(str second) { freopen(second.c_str(), "w", stdout); }
void unsyncIO() { cin.tie(0)->sync_with_stdio(0); }
void setIO(str st = "") {
  unsyncIO();
  if ((int)(st).size()) {
    setIn(st + ".in"), setOut(st + ".out");
  }
}
int n, q, a[mxN], sf[mxN];
int pref[mxN], sm[mxN];
int get_a(int l, int r) {
  return mul(add(sm[r - 1], -sm[(l - 2) < 0 ? n + 1 : l - 2]),
             inv(pref[l - 1]));
}
int get_b(int l, int r) { return mul(pref[r], inv(pref[l - 1])); }
int ans = 0;
void add_int(int l, int r, int h, int ty) {
  ans = add(ans, ty * mul(get_a(l, r - 1), inv(get_b(l, r - 1))));
  if (h != r + 1) {
    ans = add(ans, -1 * ty * mul(get_a(l, h - 1), inv(get_b(l, h - 1))));
    ans = add(ans, -1 * ty * mul(get_a(h, r - 1), inv(get_b(h, r - 1))));
  }
}
void rem(int l, int r, int h) {}
void solve() {
  int t;
  pref[0] = 1;
  sm[0] = 1;
  for (int i = 1; i <= n; i++) {
    pref[i] = mul(pref[i - 1], a[i]);
    sm[i] = add(sm[i - 1], pref[i]);
  }
  set<int> ss;
  ss.insert(1);
  ss.insert(n + 1);
  add_int(1, n + 1, n + 2, 1);
  for (int i = (0); i < (q); i++) {
    re(t);
    sf[t] ^= 1;
    if (sf[t] == 1) {
      auto th = ss.lower_bound(t);
      int r = *th;
      th--;
      int l = *th;
      add_int(l, r, t, -1);
      ss.insert(t);
    } else {
      auto th = ss.lower_bound(t);
      th--;
      int l = *th;
      th++;
      th++;
      int r = *th;
      add_int(l, r, t, 1);
      ss.erase(t);
    }
    ps(ans);
  }
}
int main() {
  setIO();
  re(n, q);
  for (int i = (1); i < (n + 1); i++) {
    re(a[i]);
    a[i] = mul(a[i], inv(100));
  }
  solve();
  return 0;
}