#include<iostream>
#include<iomanip>
using namespace std;
int main (){
    int celsius , fahrenheit;
    if (celsius<0||fahrenheit<0){
        cout<<"Invalid input";
        return 0;
    }
    double f = (celcius+32)*9/5;
    double c = (fahrenheit*9/5)-32;
    cout<<fixed<<setprecision(2);
    cout<<f<<endl;
    cout<<c;
    return 0;
}