You are given an integer sequence A_1,A_2,…,A_N. You'll make a rooted tree with N vertices numbered from 1 through N. The vertex 1 is the root, and for each vertex i (2≤i≤N), its parent p_i must satisfy p_i\<i.
You define the score of a rooted tree as follows:
There are (N−1)! ways to make a tree. Find the sum of scores of all possible trees, modulo 998244353.
The first line contains an integer N (3≤N≤250000).
The second line contains integers A_1,A_2,…,A_N (1≤A_i<998244353).
Print the answer.