In typesetting, a "river" is a string of spaces formed by gaps between words that extends down several lines of text. For instance, Figure F.1 shows several examples of rivers highlighted in red (text is intentionally blurred to make the rivers more visible).
Figure F.1: Examples of rivers in typeset text.
Figure F.2: Longest rivers (*) for two different line widths.
The first line of input contains an integer $$$n$$$ ($$$2 \le n \le 2 500$$$) specifying the number of words in the text. The following lines of input contain the words of text. Each word consists only of lowercase and uppercase letters, and words on the same line are separated by a single space. No word exceeds $$$80$$$ characters.
Display the line width for which the input text contains the longest possible river, followed by the length of the longest river. If more than one line width yields this maximum, display the shortest such line width.
21 The Yangtze is the third longest river in Asia and the longest in the world to flow entirely in one country
15 5
25 When two or more rivers meet at a confluence other than the sea the resulting merged river takes the name of one of those rivers
21 6