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