#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const long double eps = 1e-6;
const long long int MOD = 1e9 + 7;
const long long int MAX = 1e5 + 20;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s[4];
  for (long long int i = 0; i != 4; ++i) cin >> s[i];
  for (long long int i = 0; i != 3; ++i) {
    for (long long int j = 0; j != 3; ++j) {
      char c1 = s[i][j];
      char c2 = s[i][j + 1];
      char c3 = s[i + 1][j + 1];
      char c4 = s[i + 1][j];
      if (c2 == c3 && c3 == c4)
        return cout << "YES", 0;
      else if (c1 == c4 && c4 == c3)
        return cout << "YES", 0;
      else if (c1 == c2 && c2 == c4)
        return cout << "YES", 0;
      else if (c1 == c2 && c2 == c3)
        return cout << "YES", 0;
    }
  }
  cout << "NO";
  return 0;
}
