#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); ll A,B; cin >> A >> B; ll EVEN = 1, ODD = 1, MOD = 1e9+7; EVEN *= (A + (A % 2 == 0)) % MOD; EVEN %= MOD; EVEN *= (B + (B % 2 == 0)) % MOD; EVEN %= MOD; ODD *= (A + (A % 2 == 1)) % MOD; ODD %= MOD; ODD *= (B + (B % 2 == 1)) % MOD; ODD %= MOD; cout << (EVEN + ODD) % MOD << endl; }