#include <bits/stdc++.h>
using namespace std;
char grid[5][5];
int main() {
  for (int i = 0; i < 4; ++i) scanf("%s", grid[i]);
  int flag = 0;
  for (int i = 0; i < 4; ++i)
    for (int j = 0; j < 4; ++j) {
      if (i - 1 >= 0 && grid[i - 1][j] == grid[i][j] && j + 1 < 4 &&
          grid[i][j + 1] == grid[i][j]) {
        flag = 1;
        break;
      }
      if (i - 1 >= 0 && grid[i - 1][j] == grid[i][j] && j - 1 >= 0 &&
          grid[i][j - 1] == grid[i][j]) {
        flag = 1;
        break;
      }
      if (i + 1 < 4 && grid[i + 1][j] == grid[i][j] && j + 1 < 4 &&
          grid[i][j + 1] == grid[i][j]) {
        flag = 1;
        break;
      }
      if (i + 1 < 4 && grid[i + 1][j] == grid[i][j] && j - 1 >= 0 &&
          grid[i][j - 1] == grid[i][j]) {
        flag = 1;
        break;
      }
    }
  if (flag)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
