<>;[sort{$%=$-if($-=abs$a-$b)&&??|$%>$-;$b-$a}glob<>];print$%