In machine translation (MT) systems, the length of sentences affects performance. Analyzing sentence length is one of the factors for assessing translation difficulty.
The Ar-Ku+ translation company asks participants to analyze a set of sentences from English news. The information to extract is the length of each sentence and the frequency of each length. Words in a sentence are separated by a space (or spaces). It can be assumed that there are no other whitespace characters such as tabulation.
The first line contains the number of sentences (1 \leq n \leq 4000). Each of the following lines contains one sentence. A sentence can contain between and words, inclusive.
For each unique sentence length found in the input, output its length and frequency. The output must be sorted by the first value.
Example 1