#include <bits/stdc++.h>
using namespace std;
void deba(int* a, int n) {
  cerr << "| ";
  for (int i = 0; i < (n); i++) cerr << a[i] << " ";
  cerr << "|" << endl;
}
inline bool EQ(double a, double b) { return fabs(a - b) < 1e-9; }
const int INF = 1 << 30;
char m[10][10];
int v[10][10];
bool yes(int i, int j) {
  if (v[i][j] + v[i - 1][j] + v[i + 1][j] >= 2) return true;
  if (v[i][j] + v[i][j - 1] + v[i][j + 1] >= 2) return true;
  if (v[i][j] + v[i + 1][j + 1] + v[i - 1][j - 1] >= 2) return true;
  if (v[i][j] + v[i - 1][j + 1] + v[i + 1][j - 1] >= 2) return true;
  return false;
}
int main() {
  for (int i = 0; i < (10); i++)
    for (int j = 0; j < (10); j++) v[i][j] = -100;
  for (int i = (1); i <= (4); i++) scanf("%s", m[i] + 1);
  for (int i = (1); i <= (4); i++)
    for (int j = (1); j <= (4); j++) {
      if (m[i][j] == '.') v[i][j] = 0;
      if (m[i][j] == 'x') v[i][j] = 1;
    }
  for (int i = (1); i <= (4); i++)
    for (int j = (1); j <= (4); j++) {
      if (yes(i, j)) {
        cout << "YES" << endl;
        return 0;
      }
    }
  cout << "NO" << endl;
  return 0;
}
