Mr. COACH likes teaching his students about divisors. He came up with the following problem:
You are given an array A of length n. We define f(i,j)=gcd(ai,ai+1,…aj)⋅max(ai,ai+1,…aj).
Determine ∑i=1n∑j=inf(i,j) modulo 109+7
The first line will contain n (1≤n≤2⋅105). On the next line there are n integers a1,a2,…an (1≤ai≤109)
Output data
Print the sum modulo 109+7
Example 1
stdin
4
1 2 3 4
stdout
50
Example 2
stdin
5
2 4 6 12 3
stdout
457