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