public class Solution {

public int[] TwoSum(int[] numbers, int target) {

```
int first = 0, last = numbers.Length - 1;
while (first < last)
{
if (numbers[last] + numbers[first] == target)
{
return new int[] { first + 1, last + 1 };
}
if ((numbers[last] + numbers[first]) > target)
{
last--;
}
else
{
first++;
}
}
return new int[] { -1, -1 };
}
```

}