#include <bits/stdc++.h>
using namespace std;
template <typename T>
T abs(T a) {
  return a < 0 ? -a : a;
}
const int INF = (int)1e9;
const double PI = 3.1415926535897932384626433832795;
const int N = 4;
char c[N][N];
char inv(char x) { return x == '#' ? '.' : '#'; }
int main() {
  for (int i = 0; i < 4; i++) {
    scanf("\n");
    for (int j = 0; j < 4; j++) {
      scanf("%c", &c[i][j]);
      if (i && j) {
        if (c[i][j] == c[i][j] && c[i - 1][j] == c[i - 1][j - 1] &&
            c[i - 1][j - 1] == c[i][j - 1])
          goto END;
        if (inv(c[i][j]) == c[i - 1][j] && c[i - 1][j] == c[i - 1][j - 1] &&
            c[i - 1][j - 1] == c[i][j - 1])
          goto END;
      }
    }
  }
  for (int i = 0; i < 3; i++)
    for (int j = 0; j < 3; j++) {
      if (c[i][j] == c[i + 1][j] && c[i + 1][j] == c[i + 1][j + 1] &&
          c[i + 1][j + 1] == c[i][j + 1])
        goto END;
      if (inv(c[i][j]) == c[i + 1][j] && c[i + 1][j] == c[i + 1][j + 1] &&
          c[i + 1][j + 1] == c[i][j + 1])
        goto END;
    }
  for (int i = 0; i < 3; i++)
    for (int j = 1; j < 4; j++) {
      if (c[i][j] == c[i + 1][j] && c[i + 1][j] == c[i + 1][j - 1] &&
          c[i + 1][j - 1] == c[i][j - 1])
        goto END;
      if (inv(c[i][j]) == c[i + 1][j] && c[i + 1][j] == c[i + 1][j - 1] &&
          c[i + 1][j - 1] == c[i][j - 1])
        goto END;
    }
  for (int i = 1; i < 4; i++)
    for (int j = 0; j < 3; j++) {
      if (c[i][j] == c[i - 1][j] && c[i - 1][j] == c[i - 1][j + 1] &&
          c[i - 1][j + 1] == c[i][j + 1])
        goto END;
      if (inv(c[i][j]) == c[i - 1][j] && c[i - 1][j] == c[i - 1][j + 1] &&
          c[i - 1][j + 1] == c[i][j + 1])
        goto END;
    }
  puts("NO");
  return 0;
END:
  puts("YES");
  return 0;
}
