#include #include #include #include #include #include #include #include #include #include using namespace std; int main(){ double x,y; scanf("%lf%lf",&x,&y); double a=x*(1-y); double b=1-(x*y+(1-x)*y+(1-x)*(1-y)); printf("%lf %lf\n",max(a,b),min(a,b)); return 0; }