def is_valid_battleship_field(field):
    ship_lengths = [4, 3, 3, 2, 2, 2, 1, 1, 1, 1]
    for i in range(10):
        for j in range(10):
            if field[i][j] == '#' and (i == 0 or field[i - 1][j] == '.') and (j == 0 or field[i][j - 1] == '.'):
                length = 0
                while i + length < 10 and field[i + length][j] == '#':
                    length += 1
                if length == 0:
                    while j + length < 10 and field[i][j + length] == '#':
                        length += 1
                if length in ship_lengths:
                    ship_lengths.remove(length)
                else:
                    return "NO"
    return "YES" if not ship_lengths else "NO"

field = [
    "..........",
    "..........",
    "..........",
    "..........",
    "..........",
    "..........",
    "..........",
    "..........",
    "..........",
    ".........."
]

result = is_valid_battleship_field(field)
print(result)



