check if modulo is equal to K
if ( arr1 [ i ] % arr2 [ j ] == K ) : NEW_LINE INDENT s [ ( arr1 [ i ] , arr2 [ j ] ) ] = 1 NEW_LINE DEDENT else : NEW_LINE if ( arr2 [ j ] % arr1 [ i ] == K ) : NEW_LINE INDENT s [ ( arr2 [ j ] , arr1 [ i ] ) ] = 1 NEW_LINE DEDENT