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