Function to store and check the factors
bool findFactor ( int value , unordered_set < int > & factors ) { factors . insert ( value ) ; for ( int i = 2 ; i * i <= value ; i ++ ) { if ( value % i == 0 ) {