Length and frequency of sentences
In machine translation (MT) system, the length of sentences affects the performance of a MT system. The analysis of the length of sentences is one of factors to assess the difficulty of translation.
Ar-Ku+ Translation Company asks the contestants to analyze the set of sentences in English news. The information that needs to be extracted from the news is the length of the sentences and the frequency of each length. Words in a sentence are separated by a space (or spaces). We can assume that there are no other white spaces such as tab.
Input
The first line contains an integer n (1 ≤ n ≤ 4000) indicating the number of sentences. The following n lines are sentences, one sentence in each line. A sentence has between 2 to 75 words inclusive.
Output
Print out, in each line, the length of sentences that occurs in the input text and its frequency. The output must be sorted by the first value.