public void solve() throws IOException 
	{
		char[][] board = new char[4][4];
		int[][] numSharp = new int[4][4];
		for(int i = 0; i < 4; ++i)
		{
			String temp = readString();
			for(int j = 0; j < 4; ++j)
				board[i][j] = temp.charAt(j);
		}
		
		for(int i = 1; i < 4; ++i)
		{
			for(int j = 1; j < 4; ++j)
			{
				if(board[i-1][j-1] == '#') ++numSharp[i][j]; //left-up
				if(board[i][j-1] == '#') ++numSharp[i][j]; //left
				if(board[i-1][j] == '#') ++numSharp[i][j]; //up
				if(board[i][j] == '#') ++numSharp[i][j];
			}
		}
		
		if(calculate(board, numSharp))
			System.out.println("YES");
		else
			System.out.println("NO");
	}