#Lutece2954. Ain 的集合

Ain 的集合

Migrated from Lutece 2954 Ain 的集合

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

AinAin 很喜欢集合与求和。

AinAin 定义:

$S(n,m)=\{x|n \ mod \ x + m\ mod \ x \ge x, x\in Z^+\}$

现在,他想知道

$f(n,m)=\sum_{i=1}^n\sum_{j=1}^m\sum_{k\in S(i,j)}\varphi(k)\gcd(i,j)$

的值,你能帮助 AinAin 计算出上述式子的值吗?

由于答案可能很大,你只需要输出该值对 10000000071000000007 取模的结果即可。

Input

一行两个整数 n,mn,m (1n,m109)(1\le n,m\le 10^{9}),代表所求式中的 n,mn,m

Output

一行一个整数,代表 f(n,m) mod 1000000007f(n,m)\ mod\ 1000000007 的值。

Samples

2 2
13

Constraints

1n,m1091\le n,m\le 10^{9}

Resources

2023 UESTC ICPC Training for Math