Dasha got a new camera. She taked some photo about the moon, but the resolution was not too hight. In the photo only two colors are visible, white and black.
Dasha taked a lot of picture and she want to know where is the position of the moon in each photo. The moon has an r radius. The Moon is a set of
squares, where each square is colored white from the center of the moon in r range. So if a block's center in the Moon, then the block should be colored white.
Unfurtunetly some stars are visible on the picture.
Write a program which print the largest possible radius of the Moon, and print out the position of the Moon.
Two integer, w and h- the width and the height of the picture. In the next h lines contain w characters.
. means black and
* means white squares.
First line should contain the largest possible radius. The next line should contain the coordinates of the Moon's center(column, row, numbered from 1).
If there are more possible outputs, then print only the first. Left to Right, Up to Down.
Time limit 1 second
Memory limit 64 MiB
Bonus problem: Write a program, which print the Moon with a given radius.
One number, n.
Some lines. The kth line contains the amount of numbers with k prime factors 2 to n. The lines can't contain 0.