【Basic Level】
*1010 注: 0 0
#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
int a = 0, b = 0, f = 1;
while (cin >> a >> b)
{
if (b > 0)
{
if (f)
{
cout << a * b << " " << b - 1;
f = 0;
}
else
{
cout << " " << a * b << " " << b - 1;
}
}
else if (f == 1)
{
cout << 0 << " " << 0 << endl;
break;
}
else
{
cout << endl;
break;
}
}
return 0;
}