#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[4][4];
  int flag = 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++) {
      char ch = a[i][j];
      if ((ch == a[i][j + 1] && ch == a[i + 1][j] && ch != a[i + 1][j + 1]) ||
          (ch == a[i][j + 1] && ch == a[i + 1][j + 1] && ch != a[i + 1][j]) ||
          (ch == a[i + 1][j + 1] && ch == a[i + 1][j] && ch != a[i][j + 1]))
        flag = 1;
      else if (ch == a[i][j + 1] && ch == a[i + 1][j] && ch == a[i + 1][j + 1])
        flag = 1;
      else if (ch != a[i][j + 1] && ch != a[i + 1][j] && ch != a[i + 1][j + 1])
        flag = 1;
    }
  }
  if (flag == 1)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
