Hornet has acquired a lot of amulets, specifically a total of $$$n$$$! Each amulet is unique and possesses a special power. Let the power of the $$$i$$$-th amulet be denoted as $$$a_i$$$.
Since it is easy to get confused with a large number of amulets, she can merge a non-empty subsegment of amulets into one more powerful amulet once. Suppose she chooses the segment $$$[i, j]$$$. Then the power of the new amulet will be equal to $$$\mathtt{lcm}(a_i, a_{i+1}, \ldots, a_j)$$$, where $$$\mathtt{lcm}$$$ denotes the least common multiple of the numbers $$$a_i, a_{i+1}, \ldots, a_j$$$. Thus, after merging the amulets from $$$i$$$ to $$$j$$$, she will have amulets with powers $$$a_1, \ldots, a_{i-1}, a_{j+1}, \ldots, a_n, k$$$, where $$$k$$$ denotes the power of the resulting amulet.
Since Hornet is interested in the final combat power, she wants to recalculate it after merging the amulets. The combat power of a set of amulets is defined as the GCD of all the amulets in the set, where GCD or $$$\mathtt{gcd}$$$ denotes the greatest common divisor.
Hornet is interested in the sum of the combat power values for all possible ways to merge the amulets in the segment into one more powerful amulet. Formally, let $$$f(i,j)$$$ denote the combat power of Hornet's amulets that will result from merging the amulets from the $$$i$$$-th to the $$$j$$$-th inclusive. It will be equal to $$$\mathtt{gcd}(a_1, \ldots, a_{i-1}, a_{j+1}, \ldots, a_n, \mathtt{lcm}(a_i, \ldots, a_j))$$$. Hornet wants to calculate $$$\sum\limits_{i=1}^n \sum\limits_{j=i}^n f(i, j)$$$.
Help her calculate this value.
The first line contains an integer $$$n$$$ — the initial number of amulets ($$$1 \le n \le 2 \cdot 10^5$$$).
The second line contains $$$n$$$ integers $$$a_i$$$ — the initial powers of the amulets that Hornet possesses ($$$1 \le a_i \le 10^7$$$).
Output a single number — the answer to the problem. Since the answer may be large, output it modulo $$$998\,244\,353$$$.
52 6 9 3 6
44
61 2 3 4 5 6
85