OJ-Problems-Source/HDOJ/1792_autoAC.cpp
2016-08-17 15:12:28 +08:00

13 lines
194 B
C++

#include <iostream>
using namespace std;
int main()
{
int n,m,s,k;
while(cin>>n>>m)
{
s=n*m-n-m;
cout<<s<<" "<<(n-1)*(m-1)/2<<endl;
}
return 0;
}