Function to print all possible pairs
int print ( int a [ ] , int n ) { for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { if ( i != j ) cout << a [ i ] << " ▁ " << a [ j ] << " STRNEWLINE " ; } } }