#include <bits/stdc++.h>
using namespace std;
int a[4][4];
bool found(int m, int n) {
  if (m < 2) {
    if (n < 2) {
      if (a[m][n] == 1 && a[m][n + 1] == 1 && a[m][n + 2] == 1)
        return true;
      else if (a[m][n] == 1 && a[m + 1][n + 1] == 1 && a[m + 2][n + 2] == 1)
        return true;
      else if (a[m][n] == 1 && a[m + 1][n] == 1 && a[m + 2][n] == 1)
        return true;
    } else {
      if (a[m][n] == 1 && a[m][n - 1] == 1 && a[m][n - 2] == 1)
        return true;
      else if (a[m][n] == 1 && a[m + 1][n - 1] == 1 && a[m + 2][n - 2] == 1)
        return true;
      else if (a[m][n] == 1 && a[m + 1][n] == 1 && a[m + 2][n] == 1)
        return true;
    }
  } else {
    if (n < 2) {
      if (a[m][n] == 1 && a[m][n + 1] == 1 && a[m][n + 2] == 1)
        return true;
      else if (a[m][n] == 1 && a[m - 1][n + 1] == 1 && a[m - 2][n + 2] == 1)
        return true;
      else if (a[m][n] == 1 && a[m - 1][n] == 1 && a[m - 2][n] == 1)
        return true;
    } else {
      if (a[m][n] == 1 && a[m][n - 1] == 1 && a[m][n - 2] == 1)
        return true;
      else if (a[m][n] == 1 && a[m - 1][n - 1] == 1 && a[m - 2][n - 2] == 1)
        return true;
      else if (a[m][n] == 1 && a[m - 1][n] == 1 && a[m - 2][n] == 1)
        return true;
    }
  }
  return false;
}
bool can(int i, int j) {
  a[i][j] = 1;
  for (int m = 0; m < 4; m++) {
    for (int n = 0; n < 4; n++)
      if (found(m, n)) return true;
  }
  a[i][j] = 0;
  return false;
}
int main() {
  string s1, s2, s3, s4;
  cin >> s1 >> s2 >> s3 >> s4;
  for (int i = 0; i < 4; i++) {
    if (s1[i] == 'x')
      a[0][i] = 1;
    else if (s1[i] == '.')
      a[0][i] = 0;
    else
      a[0][i] = -1;
  }
  for (int i = 0; i < 4; i++) {
    if (s2[i] == 'x')
      a[1][i] = 1;
    else if (s2[i] == '.')
      a[1][i] = 0;
    else
      a[1][i] = -1;
  }
  for (int i = 0; i < 4; i++) {
    if (s3[i] == 'x')
      a[2][i] = 1;
    else if (s3[i] == '.')
      a[2][i] = 0;
    else
      a[2][i] = -1;
  }
  for (int i = 0; i < 4; i++) {
    if (s4[i] == 'x')
      a[3][i] = 1;
    else if (s4[i] == '.')
      a[3][i] = 0;
    else
      a[3][i] = -1;
  }
  bool canwin = false;
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      if (a[i][j] == 0) {
        if (can(i, j)) {
          canwin = true;
          break;
        }
      }
    }
    if (canwin) break;
  }
  if (canwin)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
