In the city of Ultima Thule job applicants are often offered an IQ test. 

The test is as follows: the person gets a piece of squared paper with a 4 × 4 square painted on it. Some of the square's cells are painted black and others are painted white. Your task is to repaint at most one cell the other color so that the picture has a 2 × 2 square, completely consisting of cells of the same color. If the initial picture already has such a square, the person should just say so and the test will be completed. 

Your task is to write a program that determines whether it is possible to pass the test. You cannot pass the test if either repainting any cell or no action doesn't result in a 2 × 2 square, consisting of cells of the same color.
Four lines contain four characters each: the *j*-th character of the *i*-th line equals "." if the cell in the *i*-th row and the *j*-th column of the square is painted white, and "#", if the cell is black.
def test_passed(grid):
    # Check if the original grid contains a 2x2 square of cells of the same color
    for i in range(3):
        for j in range(3):
            if grid[i][j] == grid[i+1][j] == grid[i][j+1] == grid[i+1][j+1]:
                return True

    # If the original grid does not contain a 2x2 square of cells of the same color,
    # try repainting each cell and check if the resulting grid contains a 2x2 square
    # of cells of the same color
    for i in range(4):
        for j in range(4):
            # Repaint the cell
            grid[i][j] = '.' if grid[i][j] == '#' else '#'

            # Check if the resulting grid contains a 2x2 square of cells of the same color
            for x in range(3):
                for y in range(3):
                    if grid[x][y] == grid[x+1][y] == grid[x][y+1] == grid[x+1][y+1]:
                        return True

            # Restore the original color of the cell
            grid[i][j] = '.' if grid[i][j] == '#' else '#'

    # If none of the attempts at repainting a cell result in a 2x2 square of cells of
    # the same color, return False
    return False

# Read in the 4x4 grid of characters
grid = []
for i in range(4):
    grid.append(list(input()))

# Determine if the test can be passed and print the result
if test_passed(grid):
    print("YES")
else:
    print("NO")
