#include <bits/stdc++.h>
using namespace std;
char mat[8][8];
int r1[] = {1, 1, 0, -1, -1, -1, 0, 1, 0, -1, -1, -1};
int c1[] = {0, 1, 1, 1, 0, -1, -1, -1, 1, 0, -1, +1};
int r2[] = {2, 2, 0, -2, -2, -2, 0, 2, 0, 1, 1, +1};
int c2[] = {0, 2, 2, 2, 0, -2, -2, -2, -1, 0, 1, -1};
int isval(int x, int y) {
  if (x >= 0 && x < 4 && y >= 0 && y < 4) return 1;
  return 0;
}
int main() {
  for (int k = 0; k < 8; k++) {
    for (int l = 0; l < 8; l++) {
      mat[k][l] = 'i';
    }
  }
  for (int k = 0; k < 4; k++) {
    for (int l = 0; l < 4; l++) {
      cin >> mat[k][l];
    }
  }
  for (int k = 0; k < 4; k++) {
    for (int l = 0; l < 4; l++) {
      if (mat[k][l] == '.') {
        for (int m = 0; m < 12; m++) {
          int x1 = k + r1[m];
          int y1 = l + c1[m];
          int x2 = k + r2[m];
          int y2 = l + c2[m];
          if (isval(x1, y1) && isval(x2, y2)) {
            char aa = mat[x1][y1];
            char bb = mat[x2][y2];
            if (aa == 'x' && bb == 'x') {
              cout << "YES" << endl;
              return 0;
            }
          }
        }
      }
    }
  }
  cout << "NO" << endl;
  return 0;
}
