AT_abc177_c [ABC177C] Sum of product of pairs

Description

[problemUrl]: https://atcoder.jp/contests/abc177/tasks/abc177_c $ N $ 個の整数 $ A_1,\ldots,A_N $ が与えられます。 $ 1\leq\ i\

Input Format

入力は以下の形式で標準入力から与えられる。 > $ N $ $ A_1 $ $ \ldots $ $ A_N $

Output Format

$ \sum_{i=1}^{N-1}\sum_{j=i+1}^{N}\ A_i\ A_j $ を $ \bmod\ (10^9+7) $ で出力せよ。

Explanation/Hint

### 制約 - $ 2\ \leq\ N\ \leq\ 2\times\ 10^5 $ - $ 0\ \leq\ A_i\ \leq\ 10^9 $ - 入力は全て整数 ### Sample Explanation 1 $ 1\ \times\ 2\ +\ 1\ \times\ 3\ +\ 2\ \times\ 3\ =\ 11 $ です。