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