#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, j, aaa = 0;
  char a[4][4];
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 4; j++) {
      cin >> a[i][j];
    }
  }
  for (i = 0; i < 2; i++) {
    for (j = 0; j < 2; j++) {
      char b[3][3];
      long long int aa = 0;
      b[0][0] = a[i][j];
      b[0][1] = a[i][j + 1];
      b[0][2] = a[i][j + 2];
      b[1][0] = a[i + 1][j];
      b[1][1] = a[i + 1][j + 1];
      b[1][2] = a[i + 1][j + 2];
      b[2][0] = a[i + 2][j];
      b[2][1] = a[i + 2][j + 1];
      b[2][2] = a[i + 2][j + 2];
      if ((b[0][0] == 'x' && b[0][1] == 'x' && b[0][2] == 'x') ||
          (b[1][0] == 'x' && b[1][1] == 'x' && b[1][2] == 'x') ||
          (b[2][0] == 'x' && b[2][1] == 'x' && b[2][2] == 'x') ||
          (b[0][0] == 'x' && b[1][0] == 'x' && b[2][0] == 'x') ||
          (b[0][1] == 'x' && b[1][1] == 'x' && b[2][1] == 'x') ||
          (b[0][2] == 'x' && b[1][2] == 'x' && b[2][2] == 'x') ||
          (b[0][0] == 'x' && b[1][1] == 'x' && b[2][2] == 'x') ||
          (b[0][2] == 'x' && b[1][1] == 'x' && b[2][0] == 'x')) {
        aaa = 1;
        cout << "YES" << endl;
        return 0;
      } else if ((b[0][0] == '.' && b[0][1] == 'x' && b[0][2] == 'x') ||
                 (b[1][0] == '.' && b[1][1] == 'x' && b[1][2] == 'x') ||
                 (b[2][0] == '.' && b[2][1] == 'x' && b[2][2] == 'x') ||
                 (b[0][0] == '.' && b[1][0] == 'x' && b[2][0] == 'x') ||
                 (b[0][1] == '.' && b[1][1] == 'x' && b[2][1] == 'x') ||
                 (b[0][2] == '.' && b[1][2] == 'x' && b[2][2] == 'x') ||
                 (b[0][0] == '.' && b[1][1] == 'x' && b[2][2] == 'x') ||
                 (b[0][2] == '.' && b[1][1] == 'x' && b[2][0] == 'x')) {
        aaa = 1;
        cout << "YES" << endl;
        return 0;
      } else if ((b[0][0] == 'x' && b[0][1] == '.' && b[0][2] == 'x') ||
                 (b[1][0] == 'x' && b[1][1] == '.' && b[1][2] == 'x') ||
                 (b[2][0] == 'x' && b[2][1] == '.' && b[2][2] == 'x') ||
                 (b[0][0] == 'x' && b[1][0] == '.' && b[2][0] == 'x') ||
                 (b[0][1] == 'x' && b[1][1] == '.' && b[2][1] == 'x') ||
                 (b[0][2] == 'x' && b[1][2] == '.' && b[2][2] == 'x') ||
                 (b[0][0] == 'x' && b[1][1] == '.' && b[2][2] == 'x') ||
                 (b[0][2] == 'x' && b[1][1] == '.' && b[2][0] == 'x')) {
        aaa = 1;
        cout << "YES" << endl;
        return 0;
      } else if ((b[0][0] == 'x' && b[0][1] == 'x' && b[0][2] == '.') ||
                 (b[1][0] == 'x' && b[1][1] == 'x' && b[1][2] == '.') ||
                 (b[2][0] == 'x' && b[2][1] == 'x' && b[2][2] == '.') ||
                 (b[0][0] == 'x' && b[1][0] == 'x' && b[2][0] == '.') ||
                 (b[0][1] == 'x' && b[1][1] == 'x' && b[2][1] == '.') ||
                 (b[0][2] == 'x' && b[1][2] == 'x' && b[2][2] == '.') ||
                 (b[0][0] == 'x' && b[1][1] == 'x' && b[2][2] == '.') ||
                 (b[0][2] == 'x' && b[1][1] == 'x' && b[2][0] == '.')) {
        aaa = 1;
        cout << "YES" << endl;
        return 0;
      }
    }
  }
  if (aaa == 0) cout << "NO" << endl;
}
