#include <bits/stdc++.h>
using namespace std;
char Arr[4][4];
bool check(int i, int j) {
  if (j >= 2) {
    if (Arr[i][j - 1] == 'x' and Arr[i][j - 2] == 'x') return true;
  }
  if (j <= 1) {
    if (Arr[i][j + 1] == 'x' and Arr[i][j + 2] == 'x') return true;
  }
  if (i >= 2) {
    if (Arr[i - 1][j] == 'x' and Arr[i - 2][j] == 'x') return true;
  }
  if (i <= 1) {
    if (Arr[i + 1][j] == 'x' and Arr[i + 2][j] == 'x') return true;
  }
  if (i + 2 < 4 and j + 2 < 4) {
    if (Arr[i + 1][j + 1] == 'x' and Arr[i + 2][j + 2] == 'x') return true;
  }
  if (i - 2 >= 0 and j - 2 >= 0) {
    if (Arr[i - 1][j - 1] == 'x' and Arr[i - 2][j - 2] == 'x') return true;
  }
  if (i + 2 < 4 and j - 2 >= 0) {
    if (Arr[i + 1][j - 1] == 'x' and Arr[i + 2][j - 2] == 'x') return true;
  }
  if (j + 2 < 4 and i - 2 >= 0) {
    if (Arr[i - 1][j + 1] == 'x' and Arr[i - 2][j + 2] == 'x') return true;
  }
  if (i > 0 and j > 0 and i < 3 and j < 3) {
    if (Arr[i + 1][j + 1] == 'x' and Arr[i - 1][j - 1] == 'x') return true;
    if (Arr[i + 1][j - 1] == 'x' and Arr[i - 1][j + 1] == 'x') return true;
  }
  if (j > 0 and j < 3) {
    if (Arr[i][j + 1] == 'x' and Arr[i][j - 1] == 'x') return true;
  }
  if (i > 0 and i < 3) {
    if (Arr[i + 1][j] == 'x' and Arr[i - 1][j] == 'x') return true;
  }
  return false;
}
int main() {
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) cin >> Arr[i][j];
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      if (Arr[i][j] == '.') {
        if (check(i, j)) {
          cout << "YES" << endl;
          return 0;
        }
      }
    }
  }
  cout << "NO" << endl;
  return 0;
}
