#include <bits/stdc++.h>
int main() {
  int i, flag = 0, j;
  char s[4][5], c;
  for (i = 0; i < 4; ++i) {
    scanf("%s", s[i]);
  }
  for (i = 0; i < 4; ++i) {
    for (j = 0; j < 4; ++j) {
      if ((s[i][j] == s[i][j + 1] && s[i][j + 1] == s[i + 1][j + 1]) ||
          (s[i][j] == s[i][j + 1] && s[i + 1][j] == s[i][j + 1])) {
        flag = 1;
        break;
      } else if ((s[i][j] == s[i - 1][j] && s[i][j] == s[i][j + 1]) ||
                 (s[i][j] == s[i - 1][j] && s[i][j - 1] == s[i][j])) {
        flag = 1;
        break;
      }
    }
    if (flag == 1) {
      printf("YES");
      break;
    }
  }
  if (flag == 0) {
    printf("NO");
  }
  return 0;
}
