// Validator #include "testlib.h" #include #include using namespace std; using mint = atcoder::modint1000000007; int main(int argc, char **argv) { registerValidation(argc, argv); long long A = inf.readLong(0LL, 1000000000000000000LL); inf.readSpace(); long long B = inf.readLong(0LL, 1000000000000000000LL); inf.readEoln(); inf.readEof(); cout << (mint(A / 2 * 2 + 1) * mint(B / 2 * 2 + 1) + mint((A + 1) / 2 * 2) * mint((B + 1) / 2 * 2)).val() << '\n'; }