Time limit: 0.5 seconds
Memory limit: 64 MB
After Rostam's diary was deciphered, it was found that after the death of the White Devil, Rostam and his army went to the cinema to rest.

The arrangement of cinema seats in the form of a table
n
x
n
It is n×n and some seats are broken. Rostam and his army entered the cinema and sat on safe seats. The number of safe seats was exactly the same as the number of soldiers...

During the movie, each of the soldiers was in one of the following 3 situations at any time, relative to the movie:

Carefree
Surprised
inquisitive
If we represent surprised soldiers with !, questioning soldiers with ?, unconcerned soldiers with _ (underline) and broken seats with #, a situation of soldiers in the cinema could look like this:

????___?
##_???_?
!!??#_??
!#__????
____!!!!
!!!___!!
_!!!!!!#
!!!?????
Plain text
The duration of the movie was 1000 seconds. During the movie playback, the soldiers talked about the movie with the nearby soldiers, and the state of the soldiers changed every second from the previous second according to the following rules.

Two soldiers are considered adjacent if on the table
n
x
n
n×n, their seats are common on one side or vertex. Therefore, each of the middle seats of the cinema has 8 adjacent seats and each of the 4 corner seats of the cinema has 3 adjacent seats.
If there are exactly 3 curious soldiers among the soldiers adjacent to a careless soldier, then in the next second, this soldier will also become curious (if the majority of the 3 adjacent soldiers were surprised, he will also be surprised, and if the majority were questioning, he will also be questioning. )
If there are less than 2 or more than 3 wise soldiers among the soldiers adjacent to a wise soldier, that soldier becomes unwise in the next second.
If there are 2 or 3 curious soldiers among the soldiers adjacent to a surprised soldier, and among those 2 or 3 curious soldiers, there are more questioners than surprised soldiers, that soldier becomes a questioner in the next second.
If there are 2 or 3 wondering soldiers among the soldiers adjacent to a questioning soldier, and among those 2 or 3 wondering soldiers, there are more surprised than questioners, that soldier will be surprised in the next second.
If none of the above events happen to a soldier in one stage, the state of that soldier will not change from the movie in the next second.
We know the situation of the soldiers at the beginning of the movie. We want to know how many soldiers are surprised and how many are questioning at the end of the video (i.e. after 1000 seconds).

input
The program must initially number
n
read n and then the basic map of the cinema in the form of a table
n
x
n
is n×n, read.
n
n will be a maximum of 50. So a 50 x 50 array is enough to store the table.

output
In the first line of the output, write the number of questioning soldiers and in the next line the number of surprised soldiers at the end of the video.

Example
Sample entry 1
8
????___?
##_???_?
!!??#_??
!#__????
____!!!!
!!!___!!
_!!!!!!#
!!!?????
Plain text
Sample output 1
4
0
Plain text
Sample entry 2
30
??_???_?_?_?_#?_????_?____??__
_?__?_???_?_?#???__?_??_?_????
__???___???__#________________
________???__##!!!!!____?_____
________???__#________________
_____________#________________
_____________??_______________
______________________________
______________________________
______!!!!!____________??????_
______________________________
___________!?!?!?!?!!________
_____#######____##########______
________#_??????!!!!??________
________#_____________________
________#___________?!?!?!?!__
______________________________
_____________________________?
____________________________??
____!!!_______________#######?
____________________________??
_____________________________?
______________________________
____________________!!_!!_____
______________________________
______________!_______________
####_______#!!!!!_____________
#__!_!!!_!!!!!!!!!!!!!_!!!_!___
#_!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
##############!!!!!!!!!!!!!!!
Plain text
Sample output 2
9
19
Plain text
An example of the state of soldiers in 1000 stages
At the beginning of the movie:

????___?
##_???_?
!!??#_??
!#__????
____!!!!
!!!___!!
_!!!!!!#
!!!?????
Plain text
Second 1:

_???__?_
##___?_?
!!?_#___
!#?_____
!__!?___
!_______
_______#
!______?
Plain text
second 2:

__?___?_
##_?__?_
!_?_#___
!#!_____
!__?____
________
_______#
________
Plain text
Second 3:

________
##??____
__??#___
!#??____
_!______
________
_______#
________
Plain text
Second 4:

________
##??____
____#___
_#_?____
_!?_____
________
_______#
________
Plain text
Second 5:

________
##______
__??#___
_#?_____
__?_____
________
_______#
________
Plain text
Second 6:

________
##______
__??#___
_#?_____
________
________
_______#
________
Plain text
From 7 to 1000 seconds (until the end of the movie), the situation of the soldiers is fixed as follows:

________
##______
__??#___
_#??____
________
________
_______#
________                write in c++