#include <bits/stdc++.h>
using namespace std;

    typedef long long ll;
    typedef long double ld;

void solve() {
    vector <vector <char>> a(12, vector <char> (12, '.'));
    for (int i = 1; i < 11; ++i) {
        for (int j = 1; j < 11; ++j) {
            cin >> a[i][j];
        }
    }

    vector <int> cnt(11, 0);

    for (int i = 1; i < 11; ++i) {
        int c = 0;
        for (int j = 1; j < 11; ++j) {
            if (a[i][j] == '#') ++c;
            else if (a[i][j] == '.') {
                ++cnt[c];
                c = 0;
            }
        }
    }

    for (int j = 1; j < 11; ++j) {
        int c = 0;
        for (int i = 1; i < 11; ++i) {
            if (a[i][j] == '#') ++c;
            else if (a[i][j] == '.') {
                ++cnt[c];
                c = 0;
            }
        }
    }

    vector <int> need = {132, 22, 3, 2, 1, 0, 0, 0, 0, 0, 0};

    bool flag = true;
    for (int i = 0; i < 11; ++i) {
        if (cnt[i] != need[i]) {
            flag = false;
        }
    }

    if (flag) cout << "YES" << '\n';
    else cout << "NO" << '\n';
}

signed main() {
    ios::sync_with_stdio(0);
    cout.tie(0);
    cin.tie(0);

    int t = 1;
    //cin >> t;

    while (t--) {
        solve();
    }
}
