#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const double g = 10.0, eps = 1e-7;
const int N = 100 + 10, maxn = 500 + 100, inf = 0x3f3f3f;
char ma[N][N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  for (int i = 0; i < 4; i++)
    for (int j = 0; j < 4; j++) cin >> ma[i][j];
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      if (i + 2 < 4) {
        int p = 0, x = 0;
        for (int k = 0; k < 3; k++) {
          if (ma[i + k][j] == '.')
            p++;
          else if (ma[i + k][j] == 'x')
            x++;
        }
        if (p == 1 && x == 2) {
          cout << "YES" << endl;
          return 0;
        }
      }
      if (j + 2 < 4) {
        int p = 0, x = 0;
        for (int k = 0; k < 3; k++) {
          if (ma[i][j + k] == '.')
            p++;
          else if (ma[i][j + k] == 'x')
            x++;
        }
        if (p == 1 && x == 2) {
          cout << "YES" << endl;
          return 0;
        }
      }
      if (i + 2 < 4 && j + 2 < 4) {
        int p = 0, x = 0;
        for (int k = 0; k < 3; k++) {
          if (ma[i + k][j + k] == '.')
            p++;
          else if (ma[i + k][j + k] == 'x')
            x++;
        }
        if (p == 1 && x == 2) {
          cout << "YES" << endl;
          return 0;
        }
      }
      if (i - 2 >= 0 && j + 2 < 4) {
        int p = 0, x = 0;
        for (int k = 0; k < 3; k++) {
          if (ma[i - k][j + k] == '.')
            p++;
          else if (ma[i - k][j + k] == 'x')
            x++;
        }
        if (p == 1 && x == 2) {
          cout << "YES" << endl;
          return 0;
        }
      }
    }
  }
  cout << "NO" << endl;
  return 0;
}
