#include <bits/stdc++.h>
using namespace std;
long long n, m, t, k, mx, mn = 1e9 + 5, a, b, c, z, cnt, ans;
int main() {
  string ar[4];
  for (int i = 0; i < 4; i++) {
    cin >> ar[i];
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      if ((ar[i][j] + ar[i + 1][j] + ar[i + 2][j] == 286) or
          (ar[i][j] + ar[i][j + 1] + ar[i][j + 2] == 286) or
          (ar[i][j] + ar[i + 1][j + 1] + ar[i + 2][j + 2] == 286) or
          (ar[i][j] + ar[i + 1][j - 1] + ar[i + 2][j - 2] == 286)) {
        cout << "YES\n";
        return 0;
      }
    }
  }
  cout << "NO\n";
}
