#include <bits/stdc++.h>
using namespace std;
char c[5][5];
int main() {
  for (int i = 0; i < 4; i++) scanf("%s", c[i]);
  bool rj = false;
  int x = 0, t = 0;
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 4; j++) {
      x = (c[i][j] == 'x') + (c[i + 1][j] == 'x') + (c[i + 2][j] == 'x');
      t = (c[i][j] == '.') + (c[i + 1][j] == '.') + (c[i + 2][j] == '.');
      if (x == 2 && t == 1) rj = true;
    }
  for (int i = 0; i < 4; i++)
    for (int j = 0; j < 2; j++) {
      x = (c[i][j] == 'x') + (c[i][j + 1] == 'x') + (c[i][j + 2] == 'x');
      t = (c[i][j] == '.') + (c[i][j + 1] == '.') + (c[i][j + 2] == '.');
      if (x == 2 && t == 1) rj = true;
    }
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 2; j++) {
      x = (c[i][j] == 'x') + (c[i + 1][j + 1] == 'x') +
          (c[i + 2][j + 2] == 'x');
      t = (c[i][j] == '.') + (c[i + 1][j + 1] == '.') +
          (c[i + 2][j + 2] == '.');
      if (x == 2 && t == 1) rj = true;
    }
  for (int i = 2; i < 4; i++)
    for (int j = 0; j < 2; j++) {
      x = (c[i][j] == 'x') + (c[i - 1][j + 1] == 'x') +
          (c[i - 2][j + 2] == 'x');
      t = (c[i][j] == '.') + (c[i - 1][j + 1] == '.') +
          (c[i - 2][j + 2] == '.');
      if (x == 2 && t == 1) rj = true;
    }
  printf(rj ? "YES\n" : "NO\n");
  return 0;
}
