Problem I: Jump


A knight is a piece used in the game of chess. The chessboard itself is a square array of cells. Each time a knight moves, its resulting position is two rows and one column, or two columns and one row away from its starting position. Thus a knight starting on row r, column c -- which we will denote as (r,c) -- can move to any of the squares (r-2,c-1), (r-2,c+1), (r-1,c-2), (r-1,c+2), (r+1,c-2), (r+1,c+2), (r+2,c-1), or (r+2,c+1). Of course, the knight may not move to any square that is not on the board.

Suppose the chessboard is square and some cells are occupied by stones. The knight can't move to the occupied cells. You can assume that the upper left square is unoccupied. Can a knight, starting in the upper left square, reach all the unoccupied cells without resting in any square more than once?


There will be multiple cases to  consider. The input for each case begins with an integer n, between 1 and 5, that specifies the size of the chessboard. The next n lines each describe one row of the chessboard, with a '.' indicating a free cell and '#' indicating a square with a stone. There are no spaces in the input file.

A line containing the number 0 signals the end of the file.


If the knight can reach all the free cells without resting in any square more than once, output "YES", else output "NO".

Sample Input




Sample Output


Author: Mathematica