float x,y;a;main(){a=scanf("%f%f",&x,&y)>printf("%f %f",x>1-y?1-y:x,x>y?x-y:0);}