#include <bits/stdc++.h> using namespace std; int n,r; long long a=0,b=0; int main(){ cin>>n>>r; for(int i=0;i<n;i++){ for(int j=0;j<r;j++){ if(i==j)a+=(n-i)*(r-j); else b+=(n-i)*(r-j); } } cout<<a<<" "<<b<<endl; return 0; }