Олимпиадный тренинг

Задача 38240. Multiplications


Задача

Темы: Строки
An algebraic expression is given, consisting of natural numbers, variables (a, b, c, ..., z) written in lowercase Latin letters, signs of arithmetic operations  + ,  - ,  *   (multiplication) and  *  *  (exponentiation). Moreover, if after the number there is a variable, then the multiplication sign can be skipped.

It is required to calculate how many multiplications and how many exponentiations are in this expression.

Input
A string of up to 200 characters and at least one character is entered. It is a valid algebraic expression.

Imprint
Print two space-separated numbers: the number of multiplications and the number of exponentiations.
Examples
# Input Output
1 2x+5 1 0
2 x**y**2z*3*5 3 2