{"raw_statement":[{"iden":"problem statement","content":"There is a grid with $N$ horizontal rows and $N$ vertical columns, where each square is painted white or black.  \nThe state of the grid is represented by $N$ strings, $S_i$. If the $j$\\-th character of $S_i$ is `#`, the square at the $i$\\-th row from the top and the $j$\\-th column from the left is painted black. If the character is `.`, then the square is painted white.\nTakahashi can choose at most two of these squares that are painted white, and paint them black.  \nDetermine if it is possible to make the grid contain $6$ or more consecutive squares painted black aligned either vertically, horizontally, or diagonally.  \nHere, the grid is said to be containing $6$ or more consecutive squares painted black aligned diagonally if the grid with $N$ rows and $N$ columns completely contains a subgrid with $6$ rows and $6$ columns such that all the squares on at least one of its diagonals are painted black."},{"iden":"constraints","content":"*   $6 \\leq N \\leq 1000$\n*   $\\lvert S_i\\rvert =N$\n*   $S_i$ consists of `#` and `.`."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$S_1$\n$S_2$\n$\\vdots$\n$S_N$"},{"iden":"sample input 1","content":"8\n........\n........\n.#.##.#.\n........\n........\n........\n........\n........"},{"iden":"sample output 1","content":"Yes\n\nBy painting the $3$\\-rd and the $6$\\-th squares from the left in the $3$\\-rd row from the top, there will be $6$ squares painted black aligned horizontally."},{"iden":"sample input 2","content":"6\n######\n######\n######\n######\n######\n######"},{"iden":"sample output 2","content":"Yes\n\nWhile Takahashi cannot choose a square to paint black, the grid already satisfies the condition."},{"iden":"sample input 3","content":"10\n..........\n#..##.....\n..........\n..........\n....#.....\n....#.....\n.#...#..#.\n..........\n..........\n.........."},{"iden":"sample output 3","content":"No"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}