#include <bits/stdc++.h>
using namespace std;
const int INF = (int)(INT_MAX - 100);
const int N = (int)(0);
const long long mod = (int)(1e+9 + 7);
int D[2] = {-1, 1};
int main() {
  vector<vector<char> > s(6, vector<char>(6, 'x'));
  for (int fil = (1); fil <= (4); fil++)
    for (int col = (1); col <= (4); col++) cin >> s[fil][col];
  for (int fil = (1); fil <= (4); fil++)
    for (int col = (1); col <= (4); col++) {
      for (int dir = (1); dir <= (4); dir++) {
        if (s[fil][col] == s[fil + D[dir & 1]][col] &&
            s[fil][col] == s[fil][col + D[(dir > 2)]])
          return puts("YES"), 0;
      }
    }
  puts("NO");
  return 0;
}
