#include <bits/stdc++.h>
using namespace std;
int yes(char a, char b, char c, char d) {
  if (a == b && b == c) {
    return 1;
  } else if (a == c && c == d) {
    return 1;
  } else if (a == d && d == b) {
    return 1;
  } else if (b == c && c == d) {
    return 1;
  } else if (a == b && b == c && c == d) {
    return 1;
  }
  return 0;
}
int main() {
  char a[4][4];
  for (int i = 0; i < 4; ++i) {
    for (int j = 0; j < 4; ++j) {
      cin >> a[i][j];
    }
  }
  int ans = 0;
  for (int i = 0; i < 3; ++i) {
    for (int j = 0; j < 3; ++j) {
      if (yes(a[i][j], a[i + 1][j + 1], a[i + 1][j], a[i][j + 1]) == 1) {
        cout << "YES";
        ans = 1;
        return 0;
      }
    }
  }
  if (ans == 0) cout << "NO";
}
