Codeforces Round 272 (Div. 1)
A
Dreamoon and Sums
Codeforces
未评级
原题
←B →
翻译中…

Dreamoon loves summing up something for no reason. One day he obtains two integers $*a*$ and $*b*$ occasionally. He wants to calculate the sum of all nice integers. Positive integer $*x*$ is called nice if image and image, where $*k*$ is some integer number in range $[1, *a*]$.

翻译中…

By image we denote the quotient of integer division of $*x*$ and $*y*$. By image we denote the remainder of integer division of $*x*$ and $*y*$. You can read more about these operations here: http://goo.gl/AcsXhT.

翻译中…

The answer may be large, so please print its remainder modulo $1 000 000 007$ ($10^{9} + 7$). Can you compute it faster than Dreamoon?

翻译中…

Input

翻译中…

The single line of the input contains two integers $*a*$, $*b*$ ($1 ≤ *a*, *b* ≤ 10^{7}$).

翻译中…

Output

翻译中…

Print a single integer representing the answer modulo $1 000 000 007$ ($10^{9} + 7$).

翻译中…

Note

翻译中…

For the first sample, there are no nice integers because image is always zero.

翻译中…

For the second sample, the set of nice integers is ${3, 5}$.

翻译中…

样例

Input #1
1 1
Output #1
0
InputCopy OutputCopy
Input #2
2 2
Output #2
8
InputCopy OutputCopy
题目信息
题号
477A
时间限制
1.5 s
内存限制
256 MB

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。