#include <bits/stdc++.h>
using namespace std;
struct debugger {
  static void call(const char* it) {}
  template <typename T, typename... aT>
  static void call(const char* it, T a, aT... rest) {
    string b;
    for (; *it && *it != ','; ++it)
      if (*it != ' ') b += *it;
    cerr << b << "=" << a << " ";
    call(++it, rest...);
  }
};
int dr[] = {0, 1, 1, -1, 0, -1, -1, 1};
int dc[] = {1, 0, 1, 1, -1, 0, -1, -1};
char field[4][4];
int dt = 0;
int tour(int r, int c, char c1, char c2, int d) {
  if (r < 0 || r > 3 || c < 0 || c > 3) return 0;
  if (field[r][c] == c2) {
    dt++;
    if (dt > 1) return 0;
  } else if (field[r][c] != c1)
    return 0;
  int ans = 1;
  ans += tour(r + dr[d], c + dc[d], c1, c2, d);
  return ans;
}
int main() {
  {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
  };
  for (int i = 0; i < 4; i++)
    for (int j = 0; j < 4; j++) cin >> field[i][j];
  int y = 0;
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      for (int k = 0; k < 4; k++) {
        if (tour(i, j, 'x', '.', k) == 3) {
          y = 1;
          break;
        }
        dt = 0;
      }
      if (y) break;
    }
    if (y) break;
  }
  if (y)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
