#include #include atcoder::modint998244353 f(long a){ return (a+a/2)*(a-a/2-1); } int main(){ long h,w; std::cin>>h>>w; std::cout<<(f(h)*w*w+f(w)*h*h-f(h)*f(w)).val()<<"\n"; }