mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
13 lines
194 B
C++
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;
|
||
|
}
|