The talking Galcian
"Ur-a-a! Earned!" - Matroskin joyfully exclaimed, hearing the first words uttered Galchonkom.
E. Uspenskiy "Three of Prostokvashino"
As you all know, Galcian from the cartoon "Three from Prostokvashino" at the knock in the door always asks: "Who's there?". Statistics, like all mathematics, is a fine science, and it argues that Galcian can remember individual words and whole sentences, but only if the word was uttered at least N times, and the sentence - at least M times (N ≤ M).
By the given text you must determine the number of words and sentences that Galcian remembered.
Input
The first line contains two positive integers N and M (N, M ≤ 100). The second line is the actual text. The text is written grammatically correctly.
Output
Two numbers, separated with spaces: the number of memorized words S, and the number of memorized sentences P.