#include <bits/stdc++.h>
char str[10][10];
int to[8][2] = {-1, -1, -1, 0, -1, 1, 0, -1, 0, 1, 1, -1, 1, 0, 1, 1};
bool judge(int x, int y) {
  for (int i = 0; i < 8; i++) {
    if (str[x + to[i][0]][y + to[i][1]] == 'x' &&
        str[x + to[i][0] * 2][y + to[i][1] * 2] == 'x')
      return true;
    if (str[x + to[i][0]][y + to[i][1]] == 'x' &&
        str[x - to[i][0]][y - to[i][1]] == 'x')
      return true;
  }
  return false;
}
int main() {
  for (int i = 1; i <= 8; i++)
    for (int j = 1; j <= 8; j++) str[i][j] = '.';
  for (int i = 3; i <= 6; i++) scanf("%s", str[i] + 3);
  for (int i = 3; i <= 6; i++) {
    for (int j = 3; j <= 6; j++) {
      if (str[i][j] == '.' && judge(i, j)) {
        printf("YES");
        return 0;
      }
    }
  }
  printf("NO");
  return 0;
}
