#include <bits/stdc++.h>
using namespace std;
char mat[4][4];
int solv(int i, int j) {
  if (i != 0 && j != 0 && mat[i - 1][j - 1] == mat[i - 1][j] &&
      mat[i - 1][j] == mat[i][j - 1])
    return 1;
  if (i != 0 && j != 3 && mat[i - 1][j + 1] == mat[i - 1][j] &&
      mat[i - 1][j] == mat[i][j + 1])
    return 2;
  if (i != 3 && j != 0 && mat[i + 1][j - 1] == mat[i][j - 1] &&
      mat[i][j - 1] == mat[i + 1][j])
    return 3;
  if (i != 3 && j != 3 && mat[i + 1][j + 1] == mat[i][j + 1] &&
      mat[i][j + 1] == mat[i + 1][j])
    return 4;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long i, j, k;
  string s[4], S;
  for (i = 0; i < 4; i += 1) {
    cin >> s[i];
  }
  for (i = 0; i < 4; i += 1) {
    S = s[i];
    for (j = 0; j < 4; j += 1) {
      mat[i][j] = S[j];
    }
  }
  for (i = 0; i < 4; i += 1) {
    for (j = 0; j < 4; j += 1) {
      if (solv(i, j)) {
        printf("YES\n");
        return 0;
      }
    }
  }
  printf("NO\n");
}
