#include <bits/stdc++.h>
using namespace std;
bool go_to_cf = false;
template <typename KeyType, typename ValueType>
pair<KeyType, ValueType> get_max(const map<KeyType, ValueType> &x) {
  using pairtype = pair<KeyType, ValueType>;
  return *max_element(x.begin(), x.end(),
                      [](const pairtype &p1, const pairtype &p2) {
                        return p1.second < p2.second;
                      });
}
bool cmpr(pair<int, int> &x, pair<int, int> &y) {
  if (x.first != y.first) return x.first > y.first;
  return x.second < y.second;
}
bool what(pair<int, int> &x, pair<int, int> &y) {
  if (x.first == y.first && x.second == y.second) return true;
  return false;
}
template <class Value>
int sqr(Value Val) {
  if (Val == 0.) return 0;
  return Val * Val;
}
template <class Value>
bool isint(Value Val) {
  if (Val - (int)Val == 0) return true;
  return false;
}
void solve(istream &is, ostream &os) {
  int t = 4, j = 0;
  vector<int> v(16);
  while (t-- > 0) {
    string s;
    is >> s;
    for (int i = 0; i < 4; ++i) {
      if (s[i] == '#') {
        v[j] = 1;
      } else {
        v[j] = 0;
      }
      j++;
    }
  }
  for (int i = 0; i < 12; ++i) {
    if (i == 3 || i == 7 || i == 11) continue;
    int cb = 0, cw = 0, j = i, t = 2;
    while (t-- > 0) {
      if (v[j]) cb++;
      if (v[j + 4]) cb++;
      if (!v[j]) cw++;
      if (!v[j + 4]) cw++;
      j++;
    }
    int df = abs(cb - cw);
    if (df == 2 || df == 4) {
      os << "YES";
      return;
    }
  }
  os << "NO";
}
void test(string const &s1, string const &s2) {
  stringstream sss;
  sss.str(s1);
  stringstream out;
  solve(sss, out);
  if (s2 == out.str())
    cout << "OK\n";
  else
    cout << "WA: " << s1 << " : " << s2 << " | " << out.str() << "\n";
}
void all_tests() {
  test("#### .#.. #### ....", "YES");
  test("#### .... #### ....", "NO");
  test("#.#. .#.#. #.#.#. .#.#.#", "NO");
  test("##.. ..#. .... ....", "YES");
  test(".... .... .... ....", "YES");
  test("#.#. #.#. .#.# .#.#", "NO");
  test("#..# .##. .##. #..#", "YES");
  test(".#.# #.#. .#.# #.##", "YES");
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cerr << "Hello";
  if (go_to_cf) {
    cout << endl;
    all_tests();
    cout << "-------------";
  } else
    solve(cin, cout);
  return 0;
}
