Fox Ciel has a board with *n* rows and *n* columns. So, the board consists of *n* × *n* cells. Each cell contains either a symbol '.', or a symbol '#'.

A cross on the board is a connected set of exactly five cells of the board that looks like a cross. The picture below shows how it looks.

Ciel wants to draw several (may be zero) crosses on the board. Each cross must cover exactly five cells with symbols '#', and any cell with symbol '#' must belong to some cross. No two crosses can share a cell.

Please, tell Ciel if she can draw the crosses in the described way.
The first line contains an integer *n* (3 ≤ *n* ≤ 100) — the size of the board.

Each of the next *n* lines describes one row of the board. The *i*-th line describes the *i*-th row of the board and consists of *n* characters. Each character is either a symbol '.', or a symbol '#'.
# https://codeforces.com/problemset/problem/389/B

import fileinput
from typing import List, Tuple
import sys


def read(c):
    if c == '.':
        return 0
    else:
        return 1


def unread(c):
    if c == 1:
        return '#'
    else:
        return '.'


def print_map(map):
    for line in map:
        print(' '.join(unread(v) for v in line))


def eat_cross_2(map, x: int, y: int):
    vectors = [(0, 0), (1, 0), (-1, 0), (0, -1), (0, 1)]
    ok = True
    for vec in vectors:
        if not map[x + vec[0]][y + vec[1]]:
            return False

    for vec in vectors:
        map[x + vec[0]][y + vec[1]] = 0
    return True


# cord = x,y
def eat_cross_down(map, x: int, y: int):
    if map[x][y]:
        if map[x][y - 1]:
            return eat_cross_2(map, x, y-1)


marked = 0
map: List[List[bool]]
n: int = None
for i, line in enumerate(fileinput.input()):
    if i == 0:
        n = int(line[:-1])
        map = [None] * n
    elif i <= n:
        map[i - 1] = [read(c) for c in line[:-1]]
        marked += map[i - 1].count(1)
        if i == n:
            break

x = 0
y = n - 1

if marked % 5 != 0:
    print('NO')
    sys.exit(0)

for x in range(n):
    for y in range(n - 1, -1, -1):
       if eat_cross_down(map, x, y):
           marked -= 5

if marked == 0:
    print('YES')
else:
    print('NO')
