#include <bits/stdc++.h>
using namespace std;
int main() {
  string s[4];
  int b = 0;
  for (int i = 0; i < 4; i++) {
    cin >> s[i];
    if (i >= 1) {
      for (int j = 0; j < 4; j++) {
        if ((s[i][j] == s[i - 1][j] &&
                 (s[i][j] == s[i - 1][j + 1] ||
                  (j != 0 && s[i][j] == s[i - 1][j - 1])) ||
             ((s[i][j] == s[i][j + 1]) && s[i][j + 1] == s[i - 1][j + 1]) ||
             (j != 0 &&
              (s[i][j] == s[i][j - 1] && s[i][j] == s[i - 1][j - 1]))))
          b = 1;
      }
    }
  }
  if (b)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
