#include <bits/stdc++.h>
using namespace std;
map<int, int> freq;
vector<char> vec;
int main() {
  char c[4][4];
  int dx[3] = {0, 1, 1};
  int dy[3] = {1, 0, 1};
  int count1 = 0, count2 = 0;
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      cin >> c[i][j];
    }
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      count1 = 0;
      count2 = 0;
      for (int k = 0; k < 3; k++) {
        int x = i + dx[k];
        int y = j + dy[k];
        if (x < 0 || y < 0 || x > 3 || y > 3) continue;
        if (c[i][j] == c[x][y])
          count1++;
        else
          count2++;
      }
      if (count1 == 2 || count1 == 3) {
        cout << "YES" << endl;
        return 0;
      } else if (count2 == 3) {
        cout << "YES" << endl;
        return 0;
      }
    }
  }
  cout << "NO" << endl;
  return 0;
}
