#include <bits/stdc++.h>
using namespace std;
char mat[10][10];
bool inside(int i, int j) { return i >= 1 and j >= 1 and i <= 4 and j <= 4; }
int main() {
  ios ::sync_with_stdio(false);
  int n;
  n = 4;
  int cate = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> (mat[i] + 1);
    for (int j = 1; j <= n; ++j) {
      if (mat[i][j] != '.') {
        ++cate;
      }
    }
  }
  if (cate & 1) {
  label:
    for (int i = 1; i <= n; ++i) {
      for (int j = 1; j <= n; ++j) {
        if (mat[i][j] == '.') {
          int cate1 = 0;
          cate = 0;
          int ii = i + 1;
          while (inside(ii, j) and mat[ii][j] == 'o') {
            ++cate;
            ++ii;
          }
          if (cate == 2) {
            cout << "YES\n";
            return 0;
          }
          cate1 = cate;
          cate = 0;
          ii = i - 1;
          while (inside(ii, j) and mat[ii][j] == 'o') {
            ++cate;
            --ii;
          }
          if (cate == 2) {
            cout << "YES\n";
            return 0;
          }
          if (cate1 + cate == 2) {
            cout << "YES\n";
            return 0;
          }
          int jj = j + 1;
          cate = 0;
          cate1 = 0;
          while (inside(i, jj) and mat[i][jj] == 'o') {
            ++cate;
            ++jj;
          }
          if (cate == 2) {
            cout << "YES\n";
            return 0;
          }
          cate1 = cate;
          jj = j - 1;
          cate = 0;
          while (inside(i, jj) and mat[i][jj] == 'o') {
            ++cate;
            --jj;
          }
          if (cate == 2) {
            cout << "YES\n";
            return 0;
          }
          if (cate1 + cate == 2) {
            cout << "YES\n";
            return 0;
          }
          ii = i + 1;
          jj = j + 1;
          cate = 0;
          cate1 = 0;
          while (inside(ii, jj) and mat[ii][jj] == 'o') {
            ++ii;
            ++jj;
            cate += 1;
          }
          if (cate == 2) {
            cout << "YES\n";
            return 0;
          }
          cate1 = cate;
          ii = i - 1;
          jj = j - 1;
          cate = 0;
          while (inside(ii, jj) and mat[ii][jj] == 'o') {
            --ii;
            --jj;
            cate += 1;
          }
          if (cate == 2) {
            cout << "YES\n";
            return 0;
          }
          if (cate1 + cate == 2) {
            cout << "YES\n";
            return 0;
          }
          ii = i - 1;
          jj = j + 1;
          cate = 0;
          cate1 = 0;
          while (inside(ii, jj) and mat[ii][jj] == 'o') {
            --ii;
            ++jj;
            cate += 1;
          }
          if (cate == 2) {
            cout << "YES\n";
            return 0;
          }
          cate1 = cate;
          ii = i + 1;
          jj = j - 1;
          cate = 0;
          while (inside(ii, jj) and mat[ii][jj] == 'o') {
            ++ii;
            --jj;
            cate += 1;
          }
          if (cate == 2) {
            cout << "YES\n";
            return 0;
          }
          if (cate1 + cate == 2) {
            cout << "YES\n";
            return 0;
          }
        }
      }
    }
  } else {
    for (int i = 1; i <= n; ++i) {
      for (int j = 1; j <= n; ++j) {
        if (mat[i][j] == 'x') {
          mat[i][j] = 'o';
        } else if (mat[i][j] == 'o') {
          mat[i][j] = 'x';
        }
      }
    }
    goto label;
    for (int i = 1; i <= n; ++i) {
      cout << (mat[i] + 1) << endl;
    }
    return 0;
  }
  cout << "NO\n";
  return 0;
}
