given in array and value, test if two elements in array sum to give the value