#include <bits/stdc++.h>
using namespace std;
long long n, i, t, k, m;
int main() {
  n = 4;
  m = 4;
  vector<string> v(n);
  for (i = 0; i < n; i++) {
    cin >> v[i];
  }
  for (i = 0; i < n - 1; i++) {
    for (long long j = 0; j < m - 1; j++) {
      long long c = 0;
      char x = v[i][j];
      if (v[i][j + 1] == x) {
        c++;
      }
      if (v[i + 1][j] == x) {
        c++;
      }
      if (v[i + 1][j + 1] == x) {
        c++;
      }
      if (c >= 2 || c == 0) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
}
