A triage tool skims a free-text bug report and needs two counts.
- A word is a maximal run of one or more ASCII letters (
a-z,A-Z). Any non-letter character (digit, space, punctuation, newline) breaks a word. Sox9ycontains the two wordsxandy, and42contains no words. - A sentence terminator is any of the characters
.,!,?. A sentence is a maximal run of one or more consecutive terminator characters; each such run counts as exactly one sentence. SoWait... really?!ends with two sentences (the run...and the run?!). Text with no terminator character contains zero sentences.
Report the word count and the sentence count.
Input format
The entire input is the text (it may span several lines).
Output format
A single line with two space-separated integers: the word count and the sentence count.
Constraints
- 0 <= length of the input text <= 5000
- The text uses printable ASCII characters and newlines.