Check for each divisor i . e . arr [ i ] % b = k or not , if yes then print that pair .
for ( int j = 0 ; j < v . Count ; j ++ ) { if ( arr [ i ] % v [ j ] == k && arr [ i ] != v [ j ] && occ [ v [ j ] ] ) { Console . Write ( " ( " + arr [ i ] + " , ▁ " + v [ j ] + " ) ▁ " ) ; isPairFound = true ; } }