#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b) {
  if (b == 0) return 1;
  if (b % 2 == 0) return power(a * a % 1000000007, b / 2);
  return a * power(a, b - 1) % 1000000007;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main(int argc, char** argv) {
  vector<string> a(4);
  cin >> a[0] >> a[1] >> a[2] >> a[3];
  vector<string> pos;
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 2; j++) {
      pos.push_back(a[i].substr(j, 3));
      string g = "";
      for (int t = 0; t < 3; t++) g += a[j + t][i];
      pos.push_back(g);
    }
  }
  string x = "";
  pos.push_back(x + a[0][0] + a[1][1] + a[2][2]);
  pos.push_back(x + a[1][1] + a[2][2] + a[3][3]);
  pos.push_back(x + a[1][0] + a[2][1] + a[3][2]);
  pos.push_back(x + a[0][1] + a[1][2] + a[2][3]);
  pos.push_back(x + a[0][3] + a[1][2] + a[2][1]);
  pos.push_back(x + a[1][3] + a[2][2] + a[3][1]);
  pos.push_back(x + a[0][2] + a[1][1] + a[2][0]);
  pos.push_back(x + a[1][2] + a[2][1] + a[3][0]);
  bool t = 0;
  for (auto i : pos) {
    if (i == "xx." || i == "x.x" || i == ".xx") t = 1;
  }
  if (t)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
