#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include using namespace std; const int MOD=1e9+7; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); ll a,b; cin>>a>>b; cout<<((a/2*2%MOD+1)*(b/2*2%MOD+1)%MOD+((a+1)/2*2%MOD)*((b+1)/2*2%MOD))%MOD<