If given two sets of integers how can I find an integer in the first set furthest away from all members of the second set. The distance of two integers is the absolute value of difference of the two integers. To clarify the question: if $a_i$ and $b_j$ are elements of the first and the second sets, I am trying to find $i$ such as $$\operatorname*{argmax}_{i} (\min_{j} |a_i - b_j|)$$
Thanks!