Islands

EasyProblem #52
Time LimitMemoryInputOutput
1 s64 MBstdinstdout

There is a graph here, even though nobody gave you a single edge.

A satellite photographed a piece of ocean and split it into a grid of rows and columns. Every square came back as one of two things: # for land, or . for water.

An island is a group of land squares you can walk across without ever getting your feet wet, stepping only up, down, left or right. Two land squares that touch only at a corner belong to different islands - you cannot step diagonally.

Your task is to count the islands on the photo, and to measure the largest one.

Input

First line of input will be a single integer - the number of testcases.
First line of each testcase contains two integers and - the number of rows and columns of the photo.
In the next lines will be characters each, either # or ., describing one row of the photo.

Output

For every testcase print a single line with two integers - the number of islands on the photo, and the number of land squares of the largest island. If the photo is all water, print 0 0.

Example

Input
1
4 6
#..##.
##..#.
....#.
.##..#
Output
4 4

There are four islands. The largest is the one on the right of the top two rows, made of squares. Notice the single square in the bottom right corner: it touches the island above it only at a corner, so it is an island of its own.

Constraints



the sum of over all testcases does not exceed

Submit your solution