Misha's Product

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Misha really loves to invent new operations. Recently he has invented the new operation, that he has named Misha's product after himself.

Misha's product of the set of different integer numbers a_1,a_2,,a_na\_1, a\_2, \ldots, a\_n is defined as follows. Consider all possible ordered pairs (a_i,a_j)(a\_i, a\_j) of different numbers from this set. For each pair write these numbers one after another without a space, and get a new number b_ijb\_{ij}. Misha's product of the initial set is the sum of all values b_ijb\_{ij}.

Help Misha to calculate Misha's product for the given set of integers. Misha wants to calculate it modulo 109+710^9 + 7.

입력

The first line contains one integer nn --- the number of elements in the set (2n1052 \le n \le 10^5).

The second line contains nn different integers a_1,a_2,,a_na\_1, a\_2, \ldots, a\_n --- numbers from the set (1a_i1081 \le a\_i \le 10^8).

출력

Output one number --- Misha's product of the given set of numbers, modulo 109+710^9 + 7.

힌트

There are six possible pairs in sample test, the following values b_ijb\_{ij} are obtained: 13, 31, 101, 103, 110, 310, their sum is equal to 668.