eolymp
bolt
Try our new interface for solving problems
Problems

The talking Galcian

The talking Galcian

Time limit 1 second
Memory limit 64 MiB

"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 (NM).

By the given text you must determine the number of words and sentences that Galcian remembered.

Input data

The first line contains two positive integers N and M (N, M100). The second line is the actual text. The text is written grammatically correctly.

Output data

Two numbers, separated with spaces: the number of memorized words S, and the number of memorized sentences P.

Examples

Input example #1
2 3
Kto tam? It is Pechkin. Kto tam? My name is Fedor. Kto tam? Pechkin!
Output example #1
4 1