#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  string s[4];
  for (int i = 0; i < 4; i++) cin >> s[i];
  int f = 0;
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 3; j++) {
      int temp = (s[i][j] != s[i + 1][j]) + (s[i][j] != s[i][j + 1]) +
                 (s[i][j] != s[i + 1][j + 1]);
      if (temp == 3 || temp == 0 ||
          (temp == 1 &&
           (s[i + 1][j] == s[i][j + 1] || s[i + 1][j] == s[i + 1][j + 1] ||
            s[i][j + 1] == s[i + 1][j + 1]))) {
        f = 1;
        break;
      }
    }
    if (f) break;
  }
  if (f)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
