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