#include #include #include using namespace std; using ll=long long; #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() template bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;} template bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;} const int MOD=998244353; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); ll H,W; cin>>H>>W; ll ans=0; ll sh=((H/2-1)*(H/2)%MOD+(H%2?H/2:0))%MOD; ll sw=((W/2-1)*(W/2)%MOD+(W%2?W/2:0))%MOD; ans=(H*W-(H/2+1)*(W/2+1))%MOD*H%MOD*W%MOD; ans+=(W/2+1)*W%MOD*sh%MOD; ans+=(H/2+1)*H%MOD*sw%MOD; ans-=sh*sw%MOD; ans%=MOD; if(ans<0)ans+=MOD; cout<