Given are n prime numbers 1<p_1<p_2<…<p_n<1018 with p_1≤100. We say that the number x is good if x is divisible by at least one p_i.
Take all good numbers a_1,a_2,⋯,a_m in \[0,p_1⋅p_2⋅…⋅p_n] and sort them in order (a_1<a_2<…<a_m). Your task is to calculate ∑_i=1m−1(a_i+1−a_i)2. As the sum could be very large, you should output it modulo 998,244,353.
The first line of the input contains a single integer n (1≤n≤105).
The next line of the input contains n integers p_1,p_2,…,p_n (1<p_1<p_2<…<p_n<1018). It is guaranteed that 2≤p_1<100 and each p_i (1≤i≤n) is a prime number.
Output a single line with a single integer, indicating the answer modulo 998,244,353.
In the first example, the list of good numbers is:
Thus, the answer is (2−0)2+(4−2)2+(5−4)2+(6−5)2+(8−6)2+(10−8)2=18.