#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 5;
const int maxm = 100000 + 5;
template <class T>
inline T Sqr(const T& x) {
  return x * x;
}
template <class T>
inline T Ksm(const T& a, const T& b, const T& m) {
  T _ = 1;
  for (; b; b >>= 1, a = a * a % m) (b & 1) ? _ = _ * a % m : 0;
  return _ % m;
}
char ch[5][5];
int getint() {
  char ch = getchar();
  int result = 0, res = 1;
  for (; '0' > ch || ch > '9'; ch = getchar()) ch == '-' ? res = -1 : 0;
  for (; '0' <= ch && ch <= '9';
       result = result * 10 + ch - '0', ch = getchar())
    ;
  return result * res;
}
int main() {
  for (int i = 1; i <= 4; ++i, getchar())
    for (int j = 1; j <= 4; ++j) ch[i][j] = getchar();
  for (int i = 1; i <= 3; ++i)
    for (int j = 1; j <= 3; ++j) {
      if (ch[i][j] != ch[i][j + 1]) continue;
      if (ch[i][j] != ch[i + 1][j]) continue;
      puts("YES");
      return 0;
    }
  for (int i = 1; i <= 3; ++i)
    for (int j = 1; j <= 3; ++j) {
      if (ch[i][j] != ch[i][j + 1]) continue;
      if (ch[i][j] != ch[i + 1][j + 1]) continue;
      puts("YES");
      return 0;
    }
  for (int i = 1; i <= 3; ++i)
    for (int j = 1; j <= 3; ++j) {
      if (ch[i][j] != ch[i + 1][j]) continue;
      if (ch[i][j] != ch[i + 1][j + 1]) continue;
      puts("YES");
      return 0;
    }
  for (int i = 1; i <= 3; ++i)
    for (int j = 1; j <= 3; ++j) {
      if (ch[i][j + 1] != ch[i + 1][j + 1]) continue;
      if (ch[i][j + 1] != ch[i + 1][j]) continue;
      puts("YES");
      return 0;
    }
  puts("NO");
  return 0;
}
