If the number is divisible by i , then insert it
if ( n % i == 0 ) { s . Add ( n / i ) ; s . Add ( i ) ; while ( m % i == 0 ) m /= i ; } } if ( m > 1 ) s . Add ( m ) ; List < int > l = new List < int > ( s ) ; l . Sort ( ) ; l . Reverse ( ) ;