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.OutputStream;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.util.TreeMap;
import java.util.Map;
import java.io.Closeable;
import java.util.Map.Entry;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) throws Exception {
        Thread thread = new Thread(null, new TaskAdapter(), "", 1 << 27);
        thread.start();
        thread.join();
    }

    static class TaskAdapter implements Runnable {
        @Override
        public void run() {
            InputStream inputStream = System.in;
            OutputStream outputStream = System.out;
            FastInput in = new FastInput(inputStream);
            FastOutput out = new FastOutput(outputStream);
            TaskC solver = new TaskC();
            solver.solve(1, in, out);
            out.close();
        }
    }

    static class TaskC {
        Modular mod = new Modular(998244353);
        Power pow = new Power(mod);
        Interval[][] intervals;
        Log2 log2 = new Log2();

        public void solve(int testNumber, FastInput in, FastOutput out) {
            int n = in.readInt();
            int q = in.readInt();
            int[] p = new int[n];
            int inv100 = pow.inverse(100);
            for (int i = 0; i < n; i++) {
                p[i] = mod.mul(in.readInt(), inv100);
            }
            int[] preMul = new int[n];
            int[] preInv = new int[n];
            for (int i = 0; i < n; i++) {
                preMul[i] = p[i];
                if (i > 0) {
                    preMul[i] = mod.mul(preMul[i - 1], preMul[i]);
                }
                preInv[i] = pow.inverse(preMul[i]);
            }

            TreeMap<Integer, Integer> set = new TreeMap<>();


            intervals = new Interval[n + 1][20];
            intervals[n][0] = new Interval();
            for (int i = n - 1; i >= 0; i--) {
                intervals[i][0] = new Interval();
                intervals[i][0].x = 1;
                intervals[i][0].y = mod.subtract(1, p[i]);
                intervals[i][0].k = p[i];
                for (int j = 0; (i + (1 << j)) <= n && intervals[i + (1 << j)][j] != null; j++) {
                    intervals[i][j + 1] = merge(intervals[i][j], intervals[i + (1 << j)][j]);
                }
            }

            int totalExp = answer(query(0, n - 1));
            set.put(0, totalExp);
            for (int i = 0; i < q; i++) {
                int point = in.readInt() - 1;
                int floor = set.floorKey(point);
                if (floor == point) {
                    //remove
                    totalExp = mod.subtract(totalExp, set.remove(point));
                    Map.Entry<Integer, Integer> floorEntry = set.floorEntry(point);
                    totalExp = mod.subtract(totalExp, floorEntry.getValue());
                    Integer right = set.ceilingKey(point);
                    if (right == null) {
                        right = n;
                    }
                    int modify = answer(query(floorEntry.getKey(), right - 1));
                    totalExp = mod.plus(totalExp, modify);
                    set.put(floorEntry.getKey(), modify);
                } else {
                    //add
                    Map.Entry<Integer, Integer> floorEntry = set.floorEntry(point);
                    totalExp = mod.subtract(totalExp, floorEntry.getValue());
                    int floorEntryNewValue = answer(query(floorEntry.getKey(), point - 1));
                    totalExp = mod.plus(totalExp, floorEntryNewValue);
                    set.put(floorEntry.getKey(), floorEntryNewValue);

                    Integer right = set.ceilingKey(point);
                    if (right == null) {
                        right = n;
                    }
                    int modify = answer(query(point, right - 1));
                    totalExp = mod.plus(totalExp, modify);
                    set.put(point, modify);
                }
                out.println(totalExp);
            }
        }

        public int answer(Interval interval) {
            return mod.mul(interval.x, pow.inverse(mod.subtract(1, interval.y)));
        }

        public Interval query(int l, int r) {
            int floorLog = log2.floorLog(r - l + 1);
            Interval left = intervals[l][floorLog];
            l += 1 << floorLog;
            if (l <= r) {
                left = merge(left, query(l, r));
            }
            return left;
        }

        public Interval merge(Interval l, Interval r) {
            Interval ans = new Interval();
            ans.x = mod.plus(l.x, mod.mul(r.x, l.k));
            ans.y = mod.plus(l.y, mod.mul(r.y, l.k));
            ans.k = mod.mul(l.k, r.k);
            return ans;
        }

    }

    static class Power {
        final Modular modular;

        public Power(Modular modular) {
            this.modular = modular;
        }

        public int pow(int x, long n) {
            if (n == 0) {
                return modular.valueOf(1);
            }
            long r = pow(x, n >> 1);
            r = modular.valueOf(r * r);
            if ((n & 1) == 1) {
                r = modular.valueOf(r * x);
            }
            return (int) r;
        }

        public int inverse(int x) {
            return pow(x, modular.m - 2);
        }

    }

    static class Modular {
        int m;

        public Modular(int m) {
            this.m = m;
        }

        public Modular(long m) {
            this.m = (int) m;
            if (this.m != m) {
                throw new IllegalArgumentException();
            }
        }

        public Modular(double m) {
            this.m = (int) m;
            if (this.m != m) {
                throw new IllegalArgumentException();
            }
        }

        public int valueOf(int x) {
            x %= m;
            if (x < 0) {
                x += m;
            }
            return x;
        }

        public int valueOf(long x) {
            x %= m;
            if (x < 0) {
                x += m;
            }
            return (int) x;
        }

        public int mul(int x, int y) {
            return valueOf((long) x * y);
        }

        public int plus(int x, int y) {
            return valueOf(x + y);
        }

        public int subtract(int x, int y) {
            return valueOf(x - y);
        }

        public String toString() {
            return "mod " + m;
        }

    }

    static class Interval {
        int x;
        int y;
        int k;

    }

    static class Log2 {
        public int floorLog(int x) {
            return 31 - Integer.numberOfLeadingZeros(x);
        }

    }

    static class FastInput {
        private final InputStream is;
        private byte[] buf = new byte[1 << 13];
        private int bufLen;
        private int bufOffset;
        private int next;

        public FastInput(InputStream is) {
            this.is = is;
        }

        private int read() {
            while (bufLen == bufOffset) {
                bufOffset = 0;
                try {
                    bufLen = is.read(buf);
                } catch (IOException e) {
                    bufLen = -1;
                }
                if (bufLen == -1) {
                    return -1;
                }
            }
            return buf[bufOffset++];
        }

        public void skipBlank() {
            while (next >= 0 && next <= 32) {
                next = read();
            }
        }

        public int readInt() {
            int sign = 1;

            skipBlank();
            if (next == '+' || next == '-') {
                sign = next == '+' ? 1 : -1;
                next = read();
            }

            int val = 0;
            if (sign == 1) {
                while (next >= '0' && next <= '9') {
                    val = val * 10 + next - '0';
                    next = read();
                }
            } else {
                while (next >= '0' && next <= '9') {
                    val = val * 10 - next + '0';
                    next = read();
                }
            }

            return val;
        }

    }

    static class FastOutput implements AutoCloseable, Closeable {
        private StringBuilder cache = new StringBuilder(10 << 20);
        private final Writer os;

        public FastOutput(Writer os) {
            this.os = os;
        }

        public FastOutput(OutputStream os) {
            this(new OutputStreamWriter(os));
        }

        public FastOutput println(int c) {
            cache.append(c).append('\n');
            return this;
        }

        public FastOutput flush() {
            try {
                os.append(cache);
                os.flush();
                cache.setLength(0);
            } catch (IOException e) {
                throw new UncheckedIOException(e);
            }
            return this;
        }

        public void close() {
            flush();
            try {
                os.close();
            } catch (IOException e) {
                throw new UncheckedIOException(e);
            }
        }

        public String toString() {
            return cache.toString();
        }

    }
}