#include <bits/stdc++.h>
int main() {
  int a[6][6], i, j, k;
  int dx[4] = {-1, 0, 1, -1}, dy[4] = {-1, -1, -1, 0};
  char x;
  memset(a, -1, sizeof(a));
  for (i = 1; i < 5; i++) {
    for (j = 1; j < 5; j++) {
      x = getchar();
      if (x == 'x') a[i][j] = 1;
      if (x == '.') a[i][j] = 0;
    }
    getchar();
  }
  for (i = 1; i < 5; i++) {
    for (j = 1; j < 5; j++) {
      for (k = 0; k < 4; k++)
        if (a[i][j] + a[i + dx[k]][j + dy[k]] + a[i - dx[k]][j - dy[k]] > 1) {
          printf("YES\n");
          return 0;
        }
    }
  }
  printf("NO\n");
  return 0;
}
