#include <bits/stdc++.h>
using namespace std;
char grid[6][6];
long long dirx[] = {1, -1, 0, 0};
long long diry[] = {0, 0, 1, -1};
int main() {
  long long cs, t, i, j, k, n, x, y, z, ans, q, m, cnt1, cnt2;
  cin >> grid[0];
  cin >> grid[1];
  cin >> grid[2];
  cin >> grid[3];
  bool flag = false;
  for (i = 0; i <= 2 && flag == false; i++)
    for (j = 0; j <= 2 && flag == false; j++) {
      cnt1 = cnt2 = 0;
      if (grid[i][j + 1] == '.')
        cnt1++;
      else
        cnt2++;
      if (grid[i + 1][j + 1] == '.')
        cnt1++;
      else
        cnt2++;
      if (grid[i + 1][j] == '.')
        cnt1++;
      else
        cnt2++;
      if (grid[i][j] == '.')
        cnt1++;
      else
        cnt2++;
      if (cnt1 >= 3 || cnt2 >= 3) {
        flag = true;
        break;
      }
    }
  if (flag == false)
    cout << "NO\n";
  else
    cout << "YES\n";
  return 0;
}
