#include #include #include using namespace std; using mint=atcoder::modint1000000007; long A,B; main() { cin>>A>>B; mint ans; if(A%2==0) { if(B%2==0) { ans=mint(A+1)*(B+1)+mint(A)*B; } else { ans=mint(A+1)*B+mint(A)*(B+1); } } else { if(B%2==0) { ans=mint(A+1)*B+mint(A)*(B+1); } else { ans=mint(A+1)*(B+1)+mint(A)*B; } } cout<