Print indices of two array elements that have the required sum