#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, cnt = 0, n = 4;
  char str[5][5];
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 4; j++) {
      cin >> str[i][j];
    }
  }
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      cnt = 0;
      if (str[i][j] == str[i][j + 1]) {
        cnt++;
      }
      if (str[i][j] == str[i + 1][j]) {
        cnt++;
      }
      if (str[i][j] == str[i + 1][j + 1]) {
        cnt++;
      }
      if (cnt >= 2 || !cnt) {
        cout << "YES" << endl;
        return 0;
      }
    }
  }
  cout << "NO" << endl;
  return 0;
}
