m@main=getLine>>=print.f.map read.words>>m f k=let s=sum k/2in round$sqrt$product$s:map(s-)k