Kkung the Shepherd

Time limit1sMemory limit128 MB

Problem

Kkung the shepherd has driven wolves into fenced areas where sheep live.

The yard is an R by C grid. . is an empty cell, # is a fence, v is a wolf, and k is a sheep. Fences cannot be crossed, and animals belong to the same area only through up, down, left, and right moves. Diagonal movement does not connect cells.

In each area, if the number of sheep is greater than the number of wolves, all wolves in that area are eaten. Otherwise, all sheep in that area are eaten.

Find how many sheep and wolves remain after every area is resolved. Areas not enclosed by fences contain no animals.

Input

The first line contains two integers R and C, the height and width of the area. (3 ≤ R, C ≤ 250)

Each of the next R lines contains a string of length C. Every character is one of ., #, v, and k.

Output

Print the number of surviving sheep and wolves, in that order, separated by a space.