#include <bits/stdc++.h>
#define ll long long int
using namespace std;
char a[12][12];

bool check(int x, int y)
{
	int cnt=0;
	if(a[x+1][y+1]=='#' or a[x+1][y-1]=='#' or a[x-1][y+1]=='#' or a[x-1][y-1]=='#')
		return false;
	if(a[x+1][y]=='#' and a[x][y+1]=='#')
		return false;
	if(a[x+1][y]=='#' and a[x][y-1]=='#')
		return false;
	if(a[x-1][y]=='#' and a[x][y+1]=='#')
		return false;
	if(a[x-1][y]=='#' and a[x][y-1]=='#')
		return false;
	return true;
}

bool oks(int x, int y)
{
	int cnt=0;
	if(a[x+1][y]=='#')
		cnt++;
	if(a[x-1][y]=='#')
		cnt++;
	if(a[x][y+1]=='#')
		cnt++;
	if(a[x][y-1]=='#')
		cnt++;
	if(cnt>=2)
		return false;
	return true;
}

int get(int x, int y, int sz, int dir=0)
{
	if(dir==0)
	{
		if(a[x+1][y]=='#')
			return get(x+1,y,sz+1,1);
		else if(a[x-1][y]=='#')
			return get(x-1,y,sz+1,2);
		else if(a[x][y+1]=='#')
			return get(x,y+1,sz+1,3);
		else if(a[x][y-1]=='#')
			return get(x,y-1,sz+1,4);
		else
			return sz;
	}
	if(dir==1)
		if(a[x+1][y]=='#')
			return get(x+1,y,sz+1,1);
		else
			return sz;
	if(dir==2)
		if(a[x-1][y]=='#')
			return get(x-1,y,sz+1,2);
		else
			return sz;
	if(dir==3)
		if(a[x][y+1]=='#')
			return get(x,y+1,sz+1,3);
		else
			return sz;
	if(dir==4)
		if(a[x][y-1]=='#')
			return get(x,y-1,sz+1,4);
		else
			return sz;
}

int main(){
	map <int,int> mp;
	bool ok=true;
	for(int i=0; i<=11; i++)
	{
		for(int j=0; j<=11; j++)
		{
			if(i==0 or i==11 or j==0 or j==11)
				a[i][j]=='.';
			else
				cin>>a[i][j];
		}
	}
	for(int i=1; i<=10; i++)
	{
		for(int j=1; j<=10; j++)
		{
			if(a[i][j]=='#')
			{
				if(check(i,j)==false)
				{
					ok=false;
					break;
				}
				if(oks(i,j))
					mp[get(i,j,1)]++;
			}
		}
	}
	if(mp[1]==4 and mp[2]==6 and mp[3]==4 and mp[4]==2 and mp.size()==4 and ok==true)
		cout<<"YES";
	else
		cout<<"NO";
}
