#include <iostream>
using namespace std;
int main() {
	float c, km;
	cin >> c >> km;
	cout << c * 9 / 5 + 32 <<" " <<km * 1000;
	return 0;
}