x,y = map(float,input().split()) y = 1-y print(max(0.0,x+y-1),min(x,y))