#include<iostream>
using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
	unsigned long long int A, iB, ans;
	float B;
	cin >> A >> B;
	iB = unsigned long long int(B);
	ans = A * iB;
	
	B -= int(B);
	B *= float(10);
	A *= unsigned long long int(B);
	A /= 10;
	ans += A;

	cout << B << "," << int(B) << endl;
	B -= int(B);
	cout << B << "," << int(B) << endl;
	B *= float(10);
	A *= unsigned long long int(B);
	A /= 100;
	ans += A;

	cout << ans;
}