#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  vector<string> s(4);
  int n, i, j, k, a, b, x, y, t;
  cin >> s[0] >> s[1] >> s[2] >> s[3];
  int v[4][2] = {1, 0, 1, 1, 0, 1, 1, -1};
  bool found = false;
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 4; j++) {
      for (k = 0; k < 4; k++) {
        a = 0;
        b = 0;
        for (t = 0; t < 3; t++) {
          x = i + v[k][0] * t;
          y = j + v[k][1] * t;
          if ((x >= 0) && (x < 4) && (y >= 0) && (y < 4)) {
            if (s[x][y] == 'x') a++;
            if (s[x][y] == '.') b++;
          }
        }
        if ((a == 2) && (b == 1)) found = true;
      }
    }
  }
  if (found)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
