#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[4][4];
  int z = 0;
  for (int i = 0; i < 4; i++)
    for (int j = 0; j < 4; j++) cin >> a[i][j];
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 3; j++) {
      if (a[i][j] + a[i + 1][j] + a[i][j + 1] + a[i + 1][j + 1] ==
              3 * 35 + 46 ||
          a[i][j] + a[i + 1][j] + a[i][j + 1] + a[i + 1][j + 1] == 4 * 35) {
        z = 1;
        break;
      } else if (a[i][j] + a[i + 1][j] + a[i][j + 1] + a[i + 1][j + 1] ==
                     3 * 46 + 35 ||
                 a[i][j] + a[i + 1][j] + a[i][j + 1] + a[i + 1][j + 1] ==
                     4 * 46) {
        z = 1;
        break;
      }
    }
    if (z == 1) break;
  }
  if (z != 0)
    cout << "YES";
  else
    cout << "NO";
}
