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 ) { int temp = spf [ x ] ; ret . push_back ( temp ) ; while ( x % temp == 0 ) x = x / temp ; } return ret ; }