Count pairs that are co - primes
for ( int i = 0 ; i < pairs . Count ; i ++ ) { for ( int j = i + 1 ; j < pairs . Count ; j ++ ) { if ( GCD ( pairs [ i ] , pairs [ j ] ) == 1 ) { count ++ ; } } } return count ; }