Martians write fractions as follows: the notation $$$\{a\}/\{b\}$$$ denotes the fraction with numerator "$$$a$$$" and denominator "$$$b$$$". Martians do not allow spaces in fraction notation, and curly braces are used only to write fractions.
The following rules are used to convert the Martian notation into the ordinary one:
For example, the notation
is converted into the ordinary one as follows:
| x |
| --- |
| m y |
| -----+----- |
| n z |
| --- |
| q |
Its width is $$$11$$$ characters, and its height is $$$7$$$ lines.
Given a Martian notation, determine the width and the height of its ordinary notation. You do not need to build the ordinary notation itself.
The only line contains a Martian notation $$$S$$$ ($$$7 \le |S| \le 250$$$). The string consists of printable ASCII characters except space.
It is guaranteed that $$$S$$$ is a correct Martian notation (the definition is given in the notes).
Print two positive integers separated by a space — the width of the ordinary notation in characters and its height in lines.
{m}/{{n}/{q}}+{{x}/{y}}/{z}
11 7
{2m}/{{n}/{q}}+{{x}/{y}}/{z+1}
11 7
{a-+-b/cc}/{3}
10 3
Let a character be any printable character except space and curly braces (including "/"). A correct Martian notation is defined as follows:
The first example is explained in the statement. In the second example, the ordinary notation is:
| x |
| --- |
| 2m y |
| -----+----- |
| n z+1 |
| --- |
| q |
In the third example, "/" inside the numerator is an ordinary character: the numerator "a-+-b/cc" has width $$$8$$$, so the width of the fraction is $$$8 + 2 = 10$$$, and the height is $$$3$$$.
| Name |
|---|


