x,y=gets.split.map &:to_f z=[x,1-y].min w=x-[x,y].min print x,' ',y