#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[5][5];
  memset(a, 'o', sizeof(a));
  for (int i = 1; i < 5; i++) {
    for (int j = 1; j < 5; j++) {
      cin >> a[i][j];
    }
  }
  int t = 0;
  for (int i = 1; i < 5; i++) {
    for (int j = 1; j < 5; j++) {
      if (a[i][j] == a[i][j + 1] &&
          (a[i][j] == a[i + 1][j] || a[i][j + 1] == a[i + 1][j + 1] ||
           a[i][j] == a[i - 1][j] || a[i][j + 1] == a[i - 1][j + 1]))
        t++;
    }
  }
  if (t > 0)
    cout << "YES";
  else
    cout << "NO";
}
