X,Y=list(map(float,input().split())) ANS=X*(1-Y) print(ANS,ANS)