#include <bits/stdc++.h>
char map[5][5];
int solve(int x, int y) {
  int ans = 0;
  for (int i = y + 1; i < 4; i++) {
    if (map[x][i] == 'x')
      ans++;
    else
      break;
  }
  for (int i = y - 1; i >= 0; i--) {
    if (map[x][i] == 'x')
      ans++;
    else
      break;
  }
  if (ans >= 2) return 1;
  ans = 0;
  for (int i = x + 1; i < 4; i++) {
    if (map[i][y] == 'x')
      ans++;
    else
      break;
  }
  for (int i = x - 1; i >= 0; i--) {
    if (map[i][y] == 'x')
      ans++;
    else
      break;
  }
  if (ans >= 2) return 1;
  ans = 0;
  for (int i = x + 1, j = y + 1; i < 4 && j < 4; i++, j++) {
    if (map[i][j] == 'x')
      ans++;
    else
      break;
  }
  for (int i = x - 1, j = y - 1; i >= 0 && j >= 0; i--, j--) {
    if (map[i][j] == 'x')
      ans++;
    else
      break;
  }
  if (ans >= 2) return 1;
  ans = 0;
  for (int i = x - 1, j = y + 1; i >= 0 && j < 4; i--, j++) {
    if (map[i][j] == 'x')
      ans++;
    else
      break;
  }
  for (int i = x + 1, j = y - 1; i < 4, j >= 0; i++, j--) {
    if (map[i][j] == 'x')
      ans++;
    else
      break;
  }
  if (ans >= 2) return 1;
  return 0;
}
int main() {
  while (scanf("%s", map[0]) != EOF) {
    int flag = 0;
    for (int i = 1; i < 4; i++) scanf("%s", map[i]);
    for (int i = 0; i < 4; i++)
      for (int j = 0; j < 4; j++)
        if (map[i][j] == '.')
          if (solve(i, j)) flag = 1;
    printf("%s\n", flag ? "YES" : "NO");
  }
}
