You are given an array of integers $a_1,a_2,\dots,a_n$. Your task is to answer queries of the following type:

\begin{itemize}
\item For given $l,r$, output the sum of products for all pairs $l\le i<j\le r$. Formally, you need to compute $\sum\limits_{l\le i<j\le r}a_i\cdot a_j$. The answer may be large, so output it modulo $10^9+7$.
\end{itemize}