Write a program to find the solution

A group of N people are seated in a line each of them have a lottery ticket with a number l(i) where i is the index of the ith person. A lottery ticket is won by a group of people who are sitting next to each other whose sum of lottery ticket numbers is the maximum. Given a group if N people as a list find the start and end index of the group in the list who would win the lottery

Lottery Numbers Input 1
{-12, -15, 8, -2, -3, 2, 1, -16}
Winners = 2 2

Output: 2 is the start index and 2 is the end index.

Lottery Numbers Input 2
Lottery Numbers = {-12, -15, 8, -4, -3, 4, 5, -6}
Winners = 2, 6

Output: 2 is the start index and 6 is the end index

You can pick any software programming language of your choice.