#include <bits/stdc++.h>
using namespace std;
const int N = 200000 + 10, inf = 0x3f3f3f3f;
int a[N], l[N];
char s[10][10], x[10][10];
void get() {
  for (int i = 1; i <= 4; i++)
    for (int j = 1; j <= 4; j++) {
      x[i][j] = s[i][j];
    }
}
int main() {
  for (int i = 1; i <= 4; i++)
    for (int j = 1; j <= 4; j++) {
      scanf(" %c", &s[i][j]);
    }
  for (int a = 1; a <= 4; a++)
    for (int b = 1; b <= 4; b++) {
      memset(x, 0, sizeof(x));
      get();
      if (x[a][b] == '.') {
        x[a][b] = 'x';
        int yes = 0;
        for (int i = 1; i <= 4; i++)
          for (int j = 1; j <= 4; j++) {
            if (x[i][j] == 'x') {
              if (x[i][j] == x[i + 1][j] && x[i - 1][j] == x[i][j]) yes = 1;
              if (x[i][j + 1] == x[i][j] && x[i][j - 1] == x[i][j]) yes = 1;
              if (x[i][j] == x[i - 1][j - 1] && x[i + 1][j + 1] == x[i][j])
                yes = 1;
              if (x[i - 1][j + 1] == x[i][j] && x[i + 1][j - 1] == x[i][j])
                yes = 1;
            }
          }
        if (yes) {
          puts("YES");
          return 0;
        }
      }
    }
  puts("NO");
  return 0;
}
