#include using namespace std; #define int long long #define app push_back #define all(x) (x).begin(),(x).end() #ifdef LOCAL #define debug(...) [](auto...a){ ((cout << a << ' '), ...) << endl;}(#__VA_ARGS__, ":", __VA_ARGS__) #else #define debug(...) #endif #ifdef LOCAL #define __int128 long long #endif // LOCAL const int p=998244353; int c2(int n) {return (n*(n-1)/2)%p;} int32_t main() { ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); int h,w;cin>>h>>w; int ans=4*c2(h/2+1)*c2(w/2+1);ans%=p; ans+=2*h*c2(w/2+1);ans%=p;ans+=2*w*c2(h/2+1);ans%=p; cout<<((2*c2((h*w)%p)-ans)%p+p)%p; return 0; }