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