A O ( log n ) function returning primefactorization by dividing by smallest prime factor at every step
vector < int > getFactorization ( int x ) { vector < int > ret ; while ( x != 1 ) { ret . push_back ( spf [ x ] ) ; x = x / spf [ x ] ; } return ret ; }