#include <cstddef>
#include <iostream>
#include <vector>

const size_t size = 12;
const char SHIP = '#';

bool hasShipFromTwoSide(const std::vector<std::vector<char>>& field, size_t i, size_t j) {
    if (field[i - 1][j - 1] == SHIP ||
        field[i + 1][j + 1] == SHIP ||
        field[i - 1][j + 1] == SHIP ||
        field[i + 1][j - 1] == SHIP) {
            return true;
    }

    return (field[i + 1][j] == SHIP || field[i - 1][j] == SHIP) && (field[i][j + 1] == SHIP || field[i][j - 1] == SHIP);
}

bool isIntersected(const std::vector<std::vector<char>>& field) {
    for (size_t i = 1; i < size - 1; ++i) {
        for (size_t j = 1; j < size - 1; ++j) {
            if (field[i][j] == SHIP && hasShipFromTwoSide(field, i, j)) {
                return true;
            }
        }
    }
    return false;
}

size_t countShipLen(std::vector<std::vector<char>>& field, size_t i, size_t j) {
    size_t len = 0;
    if (field[i + 1][j] == SHIP) {
        for (size_t k = 0; k < 4; ++k) {
            if (i + k < size && field[i + k][j] == SHIP) {
                field[i + k][j] = '.';
                ++len;
            }
        }
        return len;
    }

    if (field[i][j + 1] == SHIP) {
        for (size_t k = 0; k < 4; ++k) {
            if (j + k < size && field[i][j + k] == SHIP) {
                field[i][j + k] = '.';
                ++len;
            }
        }
        return len;
    }

    return 1;
}

bool isCorrect(std::vector<std::vector<char>>& field) {
    if (isIntersected(field)) {
        return false;
    }

    std::vector<size_t> ship_numbers(4, 0);
    for (size_t i = 1; i < size - 1; ++i) {
        for (size_t j = 1; j < size - 1; ++j) {
            if (field[i][j] == SHIP) {
                auto len = countShipLen(field, i, j);
                ++ship_numbers[len - 1];
            }
        }
    }

    for (size_t i = 0; i < 4; ++i) {
        if (ship_numbers[i] + i != 4) {
            return false;
        }
    }

    return true;
}

int main() {
    std::vector<std::vector<char>> field(size, std::vector<char>(size));

    for (size_t i = 1; i < size - 1; ++i) {
        for (size_t j = 1; j < size - 1; ++j) {
            std::cin >> field[i][j];
        }
    }

    std::cout << (isCorrect(field) ? "YES" : "NO");


    return 0;
}