#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
void fastio() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
long long dp[101][1001], ans1 = 1e10;
long long num[10];
signed main() {
  fastio();
  long long t = 1;
  while (t--) {
    char a[5][5];
    for (long long i = 0; i < 4; i++)
      for (long long j = 0; j < 4; j++) cin >> a[i][j];
    for (long long i = 0; i < 3; i++)
      for (long long j = 0; j < 3; j++)
        if (a[i][j] + a[i + 1][j] + a[i][j + 1] + a[i + 1][j + 1] != 162) {
          cout << "YES";
          return 0;
        }
    cout << "NO";
  }
}
