Be Geeks!
题号:NC209400
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

The musical band Be Geeks! got its name by no accident, as all the members are genuine math geeks. Among others, they love examining various properties of number sequences. Let’s see an
example of their subject of interest.
Let   be a nonempty sequence of positive integers, 
Let , where .
Let , where .
Let , where .
Let  over all pairs of integers . The function gcd stands for the greatest common divisor of the given values.
The greatest common divisor of a nonempty sequence of integers is the biggest integer which divides each integer in the sequence evenly.

输入描述:

The first line contains one integer 
The next line contains  integers .

输出描述:

Print the value of F(A) modulo 1000000007.
示例1

输入

复制
4
1 2 3 4

输出

复制
50
示例2

输入

复制
5
2 4 6 12 3

输出

复制
457