x, y = list(map(float, input().split())) print("{0:.16f} {1:.16f}".format(round(x, 16), round(1-y, 16)))