/*

*/
#include <iostream>

using namespace std;

int main(int argc, char const *argv[]) {

   int vec[] = {1,2,5,-4,5,-6,7,1,-1,-7,1,10,1,-3,4},

   n = sizeof(vec) / sizeof(vec[0]);

   int smax, pmax, lmax, i, s, p = 1;

   i = 0;

   while(i < n) {

       while(vec[i] <= 0 && i < n) i++;

       s = 0;
       p = i;

       while(vec[i] >= 0 && i < n) {
         s = s + vec[i];
         i++;
       }

       if(s > smax) {
         smax = s;
         pmax = p;
         lmax = i - p;
       }
   }
   cout<<pmax<<"-"<<lmax<<"-"<<smax;

  return 0;
}
