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 JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        final int MOD = 998244353;
        int n;
        int log;
        int[] p;
        int[][][] table;

        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            n = in.nextInt();
            int numQueries = in.nextInt();
            p = new int[n + 1];
            long inv100 = inv(100);
            for (int i = 0; i < n; i++) {
                p[i] = (int) ((in.nextInt() * inv100) % MOD);
            }
            p[n] = 1;
            precalc();

            int[] next = new int[n + 1];
            int[] prev = new int[n + 1];
            Arrays.fill(next, -1);
            Arrays.fill(prev, -1);
            next[0] = n;
            prev[n] = 0;

            FenwickTree tree = new FenwickTree(n + 1);
            tree.add(0, 1);
            tree.add(n, 1);
            boolean[] isOn = new boolean[n + 1];
            isOn[0] = true;
            isOn[n] = true;
            int[] f = new int[n + 1];
            f[0] = calc(0, n);
            int ans = f[0];
            for (int query = 0; query < numQueries; query++) {
                int x = in.nextInt() - 1;

                if (!isOn[x]) {
                    int l = -1;
                    int r = n;
                    int beforeX = tree.sum(x);
                    while (r - l > 1) {
                        int m = (l + r) / 2;
                        if (tree.sum(m) < beforeX) {
                            l = m;
                        } else {
                            r = m;
                        }
                    }

                    l = r;
                    r = next[l];

                    if (!isOn[l] || !isOn[r]) {
                        throw new AssertionError();
                    }

                    prev[x] = l;
                    next[x] = r;
                    next[l] = x;
                    prev[r] = x;

                    ans -= f[l];
                    if (ans < 0) {
                        ans += MOD;
                    }
                    f[l] = calc(l, x);
                    f[x] = calc(x, r);
                    ans += f[l];
                    if (ans >= MOD) {
                        ans -= MOD;
                    }
                    ans += f[x];
                    if (ans >= MOD) {
                        ans -= MOD;
                    }
                } else {
                    int l = prev[x];
                    int r = next[x];
                    next[l] = r;
                    prev[r] = l;

                    ans -= f[x];
                    if (ans < 0) {
                        ans += MOD;
                    }
                    ans -= f[l];
                    if (ans < 0) {
                        ans += MOD;
                    }
                    f[l] = calc(l, r);
                    ans += f[l];
                    if (ans >= MOD) {
                        ans -= MOD;
                    }
                }
                tree.add(x, isOn[x] ? -1 : +1);
                isOn[x] ^= true;
                out.println(ans);
            }
        }

        private void precalc() {
            log = 0;
            while ((1 << log) < n) {
                ++log;
            }
            table = new int[log][n][];
            for (int level = 0; level < log; level++) {
                for (int i = 0; i + (1 << level) <= n; i++) {
                    if (level == 0) {
                        table[level][i] = new int[]{1, p[i]};
                    } else {
                        int j = i + (1 << (level - 1));
                        int[] u = table[level - 1][i];
                        int[] v = table[level - 1][j];
                        table[level][i] = combine(u, v);
                    }
                }
            }
        }

        private int calc(int l, int r) {
            int[] a = table[0][l];
            ++l;
            for (int level = log - 1; level >= 0; level--) {
                int nl = l + (1 << level);
                if (nl <= r) {
                    a = combine(a, table[level][l]);
                    l = nl;
                }
            }
            return (int) ((long) a[0] * inv(a[1]) % MOD);
        }

        private int[] combine(int[] a, int[] b) {
            long nx = (a[0] + (long) a[1] * b[0]) % MOD;
            long ny = (long) a[1] * b[1] % MOD;
            return new int[]{(int) nx, (int) ny};
        }

        private int inv(long x) {
            return pow(x, MOD - 2);
        }

        private int pow(long a, long n) {
            long r = 1;
            while (n > 0) {
                if (n % 2 == 1) {
                    r = r * a % MOD;
                }
                a = a * a % MOD;
                n /= 2;
            }
            return (int) r;
        }

        class FenwickTree {
            int[] a;

            FenwickTree(int n) {
                a = new int[n];
            }

            public void add(int pos, int val) {
                while (pos < a.length) {
                    a[pos] += val;
                    pos |= pos + 1;
                }
            }

            public int sum(int r) {
                int res = 0;
                while (r >= 0) {
                    res += a[r];
                    r = (r & (r + 1)) - 1;
                }
                return res;
            }

        }

    }

    static class FastScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public FastScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}