#include <bits/stdc++.h>
using namespace std;
char t[5][5];
bool solve(int x, int y) {
  int ans = 0;
  char c = t[x][y];
  if (t[x][y + 1] == c) ans++;
  if (t[x + 1][y] == c) ans++;
  if (t[x + 1][y + 1] == c) ans++;
  if (ans == 0 || ans == 2 || ans == 3) return 1;
  return 0;
}
int main() {
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      cin >> t[i][j];
    }
  }
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 3; j++) {
      if (solve(i, j)) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
}
