while 1: try: x,y=map(float,input().split()) except: break p=x*(1-y) print("{0:.15f} {0:.15f}".format(p))