def is_valid_ship_placement(field):

    num_hashtags = sum(row.count('#') for row in field)
    
    if num_hashtags != 20:
        return "NO"
    

    for i in range(10):
        for j in range(10):
            if field[i][j] == '#':
                if (i < 9 and field[i + 1][j] == '#') or (j < 9 and field[i][j + 1] == '#'):
                    return "NO"
    
    return "YES"


field = [input() for _ in range(10)]


print(is_valid_ship_placement(field))
