#include using namespace std; int main(){ double X,Y; cin >> X >> Y; double a = X * (1-Y); double b = X * (1-X); double c = X * (1-Y) + Y * (1-X); double d = Y * (1-X) + X * (1-Y); printf("%.10lf %.10lf\n",min({a,b,c,d}),max({a,b,c,d})); }