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