#include <iostream>
#include <cmath>
using namespace std;
int main()
{
//Declaram si citim variabilele
float a,b,c,d,calcul_a,calcul_b;
cin>>a>>b;
//Efectuam operatiile
c = sqrt(a);
d = sqrt(b);
calcul_a = c + d;
calcul_b = round(calcul_a);
//Le scriem in consola
cout << c << " " << d<< endl;
cout << calcul_b;
}