#include <bits/stdc++.h>
using namespace std;
int main() {
  char t[10][10] = {0};
  for (int i = 0; i < 4; i++)
    for (int j = 0; j < 4; j++) cin >> t[i][j];
  for (int i = 0; i < 4; i++)
    for (int j = 0; j < 4; j++)
      if ((t[i][j] + t[i + 1][j] + t[i + 2][j] == 286) or
          (t[i][j] + t[i][j + 1] + t[i][j + 2] == 286) or
          (t[i][j] + t[i + 1][j + 1] + t[i + 2][j + 2] == 286) or
          (t[i][j] + t[i + 1][j - 1] + t[i + 2][j - 2] == 286)) {
        cout << "YES";
        return 0;
      }
  cout << "NO";
  return 0;
}
