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