<>=~$";$s+=$_ for@a=glob<>;print$s?$_*$'/$s:0,$"for@a