#include <bits/stdc++.h>
using namespace std;
int main() {
  char map[4][4];
  int total;
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      cin >> map[i][j];
    }
  }
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 3; j++) {
      total = 0;
      if (map[i][j] == map[i + 1][j]) total++;
      if (map[i][j] == map[i][j + 1]) total++;
      if (map[i][j] == map[i + 1][j + 1]) total++;
      if (total != 1) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
  return 0;
}
