count the number for each prime factor
for ( int i = 3 ; i <= sqrt ( n ) ; i += 2 ) { while ( n % i == 0 ) { n = n / i ; count [ i ] ++ ; } } if ( n > 2 ) count [ n ] ++ ; int flag = 0 ; for ( auto b : count ) {