finding the indeces,sum of which values equal to given no