You are given a square crossword puzzle of size N \times N. In this puzzle, empty cells are represented by the symbol -, while filled cells are represented by the symbol #. According to the rules of crosswords, each word must be at least letters long.
Your task is to count the number of words that appear horizontally and vertically in the crossword.
The first line contains the integer (1 \leq N \leq 2000), which represents the size of the crossword. The following lines each contain characters, consisting of - and #, as described above.
Print two numbers: the first is the count of words found horizontally, and the second is the count of words found vertically.
Primer 1