X,Y = map(float,input().split()) print(X-max(X+Y-1,0),max(X-Y,0))