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