#include <bits/stdc++.h>
using namespace std;
int dc1[] = {1, 1, 1, 0};
int dr1[] = {1, 0, -1, 1};
int dc2[] = {-1, -1, -1, 0};
int dr2[] = {-1, 0, 1, -1};
int main() {
  vector<vector<char> > v(4);
  char c;
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      cin >> c;
      v[i].push_back(c);
    }
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      if (v[i][j] == '.') {
        for (int k = 0; k < 4; k++) {
          if (0 <= i + dr1[k] && i + dr1[k] < 4 && 0 <= i + dr2[k] &&
              i + dr2[k] < 4 && 0 <= j + dc1[k] && j + dc1[k] < 4 &&
              0 <= j + dc2[k] && j + dc2[k] < 4) {
            if (v[i + dr1[k]][j + dc1[k]] == 'x' &&
                v[i + dr2[k]][j + dc2[k]] == 'x') {
              cout << "YES";
              return 0;
            }
          }
        }
      }
      if (v[i][j] == 'x') {
        for (int k = 0; k < 4; k++) {
          if (0 <= i + dr1[k] && i + dr1[k] < 4 && 0 <= i + dr2[k] &&
              i + dr2[k] < 4 && 0 <= j + dc1[k] && j + dc1[k] < 4 &&
              0 <= j + dc2[k] && j + dc2[k] < 4) {
            if ((v[i + dr1[k]][j + dc1[k]] == '.' &&
                 v[i + dr2[k]][j + dc2[k]] == 'x') ||
                (v[i + dr1[k]][j + dc1[k]] == 'x' &&
                 v[i + dr2[k]][j + dc2[k]] == '.')) {
              cout << "YES";
              return 0;
            }
          }
        }
      }
    }
  }
  cout << "NO";
}
