Compute the numbers of islands on the map.
The character '~' means water. There are two types of islands, denoted as '#' and '@'.
Take the following map for example:

The number of #-typed islands is 3, and the number of @-typed islands is 2.
Note that two '#'s are considered connected only if they are horizontal or vertical neighbors. Diagonal neighbors are not considered connected. The rule is the same for '@'.
The first line contains two integers m, n, representing the height and width of the map.
The next m lines contain n characters for the mth row of the map.
It is guaranteed that 1 ≤ m, n ≤ 1000
Print the number of islands for '#' and the number of islands for '@'.
The two numbers are separated by a whitespace. Please include a newline character '\n' at the end of the output.