Check if pair exits
if ( ( prod % curr == 0 ) && ( s . find ( prod / curr ) != s . end ( ) ) ) { cout << curr << " ▁ " << prod / curr ; return true ; } s . insert ( p -> data ) ; p = p -> next ; } return false ; }