The talking bird#1099

The talking bird

1 second
64 megabytes
Easy

Statistics, like all mathematics, is an exact science, and it states that a bird can remember individual words and whole sentences only if a word was pronounced at least times and a sentence at least times (N \le M).

Given a text, determine the number of words and sentences that the bird would definitely remember.

Input

The first line contains two positive integers and (N, M \le 100). The second line contains the text itself. The text is grammatically correct.

Output

Output two numbers separated by a space: the number of memorized words , and the number of memorized sentences .

Examples

Example 1

Loading
Loading