$a=<>;printf sort{$a-$b}map{//*grep$'**$_<$a,(0..63)x$'}2..5