#include <bits/stdc++.h>
using namespace std;
const long long INF = 1 << 28;
const long long LINF = 1ll << 61;
char s[5][5];
int dx[4] = {1, 0, 1, -1};
int dy[4] = {0, 1, 1, 1};
bool check() {
  for (int i = 0; i <= 3; i++)
    for (int j = 0; j <= 3; j++)
      for (int d = 0; d < 4; d++) {
        bool ok = 1;
        for (int k = 0; k < 3; k++) {
          int nx = i + k * dx[d], ny = j + k * dy[d];
          ok &= (nx < 4 && ny < 4 && nx >= 0 && ny >= 0 && s[nx][ny] == 'x');
        }
        if (ok) return true;
      }
  return false;
}
int main() {
  for (int i = 0; i < 4; i++) scanf("%s", s[i]);
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      if (s[i][j] == '.') {
        s[i][j] = 'x';
        if (check()) {
          puts("YES");
          return 0;
        }
        s[i][j] = '.';
      }
    }
  }
  puts("NO");
  return 0;
}
