#include using namespace std; typedef long long LL; int main(int argc, char* argv[]) { LL A,B; cin>>A>>B; LL Min=min(A,B); LL Max=max(A,B); LL D=0; for (LL i=1;i<=Min;i++){ D+=Max; D%=1000000007; } cout<