#include <bits/stdc++.h>
using namespace std;
char c[4][4];
bool use[4][4];
int dx[8] = {1, 1, 1, 0, -1, -1, -1, 0};
int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
inline void dfs() {
  int i, j, xx, yy, p, q;
  bool ok = 1;
  for (p = 0; p < 4; p++) {
    for (q = 0; q < 4; q++) {
      for (i = 0; i < 8; i++) {
        for (j = 0; j < 3; j++) {
          xx = p + dx[i] * j;
          yy = q + dy[i] * j;
          if (xx < 0 || xx == 4 || yy < 0 || yy == 4) {
            ok = 0;
            break;
          }
          if (c[xx][yy] != 'x') {
            ok = 0;
            break;
          }
        }
        if (ok == 1) {
          cout << "YES" << endl;
          exit(0);
        }
        ok = 1;
      }
    }
  }
}
int main() {
  int i, j, x, y;
  for (i = 0; i < 4; i++)
    for (j = 0; j < 4; j++) cin >> c[i][j];
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 4; j++) {
      if (c[i][j] != '.') continue;
      c[i][j] = 'x';
      dfs();
      c[i][j] = '.';
    }
  }
  cout << "NO" << endl;
  return 0;
}
