{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"Bill is developing a new mathematical theory for human emotions. His recent investigations are dedicated to studying how good or bad days influent people\u0027s memories about some period of life. \r\u003cbr\u003e\r\u003cbr\u003eA new idea Bill has recently developed assigns a non-negative integer value to each day of human life. \r\u003cbr\u003e\r\u003cbr\u003eBill calls this value the emotional value of the day. The greater the emotional value is, the better the daywas. Bill suggests that the value of some period of human life is proportional to the sum of the emotional values of the days in the given period, multiplied by the smallest emotional value of the day in it. This schema reflects that good on average period can be greatly spoiled by one very bad day. \r\u003cbr\u003e\r\u003cbr\u003eNow Bill is planning to investigate his own life and find the period of his life that had the greatest value. Help him to do so. "}},{"title":"Input","value":{"format":"HTML","content":"The first line of the input contains n - the number of days of Bill\u0027s life he is planning to investigate(1 \u0026lt;\u003d n \u0026lt;\u003d 100 000). The rest of the file contains n integer numbers a1, a2, ... an ranging from 0 to 10\u003csup\u003e6\u003c/sup\u003e - the emotional values of the days. Numbers are separated by spaces and/or line breaks."}},{"title":"Output","value":{"format":"HTML","content":"Print the greatest value of some period of Bill\u0027s life in the first line. And on the second line print two numbers l and r such that the period from l-th to r-th day of Bill\u0027s life(inclusive) has the greatest possible value. If there are multiple periods with the greatest possible value,then print any one of them. "}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e6\r\n3 1 6 4 5 2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e60\r\n3 5\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}