#include <bits/stdc++.h>
#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:10240000,10240000")
using namespace std;
char ss[10][10];
int dx[8][2] = {{0, 1}, {0, -1},  {1, 0},  {-1, 0},
                {1, 1}, {-1, -1}, {-1, 1}, {1, -1}};
int dp[7][7][10];
int dfs(int i, int j, int k) {
  if (dp[i][j][k] != -1) return dp[i][j][k];
  dp[i][j][k] = 1;
  if (i + dx[k][0] > 0 && i + dx[k][0] < 5 && j + dx[k][1] > 0 &&
      j + dx[k][1] < 5) {
    if (ss[i + dx[k][0]][j + dx[k][1]] == ss[i][j])
      dp[i][j][k] += dfs(i + dx[k][0], j + dx[k][1], k);
  }
  return dp[i][j][k];
}
bool cmp(int i, int j) {
  for (int k = 0; k < 8; k += 2) {
    int a = 0, b = 0;
    if (ss[i + dx[k][0]][j + dx[k][1]] == 'x')
      a = dfs(i + dx[k][0], j + dx[k][1], k);
    if (ss[i + dx[k + 1][0]][j + dx[k + 1][1]] == 'x')
      b = dfs(i + dx[k + 1][0], j + dx[k + 1][1], k + 1);
    if (a + b > 1) return true;
  }
  return false;
}
int main() {
  memset(dp, -1, sizeof(dp));
  bool flag = false;
  for (int i = 1; i < 5; i++) scanf("%s", ss[i] + 1);
  for (int i = 1; i < 5; i++)
    for (int j = 1; j < 5; j++)
      if (ss[i][j] == '.')
        if (cmp(i, j)) flag = true;
  if (flag)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
