#include <bits/stdc++.h>
using namespace std;
int a[8][8];
bool check(int i1, int j1, int i2, int j2) {
  if (i1 >= 0 && j1 >= 0 && i2 >= 0 && j2 >= 0 && i1 < 4 && j1 < 4 && i2 < 4 &&
      j2 < 4) {
    if (a[i1][j1] == 1 && a[i2][j2] == 1) return true;
  }
  return false;
}
int main() {
  int t, n, m, x, y;
  char s[8];
  memset(a, 0, sizeof(a));
  for (int i = 0; i < 4; ++i) {
    scanf("%s", s);
    for (int j = 0; j < 4; ++j) {
      if (s[j] == 'x') a[i][j] = 1;
      if (s[j] == 'o') a[i][j] = 2;
    }
  }
  bool ans = false;
  for (int i = 0; i < 4; ++i) {
    for (int j = 0; j < 4; ++j) {
      if (a[i][j] == 0) {
        if (check(i - 1, j, i + 1, j)) ans = true;
        if (check(i - 1, j, i - 2, j)) ans = true;
        if (check(i + 1, j, i + 2, j)) ans = true;
        if (check(i, j - 1, i, j + 1)) ans = true;
        if (check(i, j - 1, i, j - 2)) ans = true;
        if (check(i, j + 1, i, j + 2)) ans = true;
        if (check(i - 1, j - 1, i + 1, j + 1)) ans = true;
        if (check(i - 1, j - 1, i - 2, j - 2)) ans = true;
        if (check(i + 1, j + 1, i + 2, j + 2)) ans = true;
        if (check(i - 1, j + 1, i + 1, j - 1)) ans = true;
        if (check(i - 1, j + 1, i - 2, j + 2)) ans = true;
        if (check(i + 1, j - 1, i + 2, j - 2)) ans = true;
      }
    }
  }
  printf(ans ? "YES" : "NO");
  return 0;
}
