#include <bits/stdc++.h>
using namespace std;
int main() {
  char M[8][8];
  int X1[] = {-1, -1, -1, 0, 0, 1, 1, 1};
  int Y1[] = {1, 0, -1, 1, -1, 1, 0, -1};
  int X2[] = {1, 1, 1, 0, 0, -1, -1, -1};
  int Y2[] = {-1, 0, 1, -1, 1, -1, 0, 1};
  bool flag = 0;
  for (int i = 0; i < 4; i++) scanf("%s", &M[i]);
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      if (M[i][j] == '.') {
        int u, v, x, y, a, b;
        for (int k = 0; k < 8; k++) {
          u = i + X1[k];
          v = j + Y1[k];
          x = i + X2[k];
          y = j + Y2[k];
          a = i + 2 * X1[k];
          b = j + 2 * Y1[k];
          if (u >= 0 && u < 4 && v >= 0 && v < 4 && x >= 0 && x < 4 && y >= 0 &&
              y < 4) {
            if (M[u][v] == 'x' && M[x][y] == M[u][v]) flag = 1;
          }
          if (a >= 0 && a < 4 && b >= 0 && b < 4) {
            if (M[u][v] == M[a][b] && M[u][v] == 'x') flag = 1;
          }
        }
      }
    }
  }
  if (flag)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
