#include <bits/stdc++.h>
using namespace std;
inline int G() {
  char tt = getchar();
  int o, f = 0;
  while (tt < '0' || tt > '9') {
    if (tt == '-') f = 1;
    tt = getchar();
  }
  for (o = 0; tt >= '0' && tt <= '9'; tt = getchar()) o = o * 10 + tt - '0';
  return f ? -o : o;
}
const int INF = 0x3c3c3c3c;
int n, i, j, k, ni, nj;
char S[5][5];
int dx[8] = {0, 1, 1, 1, 0, -1, -1, -1};
int dy[8] = {1, 1, 0, -1, -1, -1, 0, 1};
int main() {
  for (i = 1; i <= 4; i++) {
    scanf("%s", &S[i][1]);
  }
  for (i = 1; i <= 4; i++) {
    for (j = 1; j <= 4; j++) {
      if (S[i][j] == 'x') {
        for (k = 0; k < 8; k++) {
          ni = i + dx[k], nj = j + dy[k];
          if (S[ni][nj] == 'x') {
            ni += dx[k], nj += dy[k];
            if (S[ni][nj] == '.') return cout << "YES", 0;
          } else if (S[ni][nj] == '.') {
            ni += dx[k], nj += dy[k];
            if (S[ni][nj] == 'x') return cout << "YES", 0;
          }
        }
      }
    }
  }
  cout << "NO";
  return 0;
}
