#include <bits/stdc++.h>
using namespace std;
int game[8][8];
bool check(int x, int y) {
  if (game[x][y - 2] == -1 && game[x][y - 1] == -1) return true;
  if (game[x][y - 1] == -1 && game[x][y + 1] == -1) return true;
  if (game[x][y + 1] == -1 && game[x][y + 2] == -1) return true;
  if (game[x - 2][y] == -1 && game[x - 1][y] == -1) return true;
  if (game[x - 1][y] == -1 && game[x + 1][y] == -1) return true;
  if (game[x + 1][y] == -1 && game[x + 2][y] == -1) return true;
  if (game[x - 2][y - 2] == -1 && game[x - 1][y - 1] == -1) return true;
  if (game[x - 1][y - 1] == -1 && game[x + 1][y + 1] == -1) return true;
  if (game[x + 1][y + 1] == -1 && game[x + 2][y + 2] == -1) return true;
  if (game[x - 2][y + 2] == -1 && game[x - 1][y + 1] == -1) return true;
  if (game[x - 1][y + 1] == -1 && game[x + 1][y - 1] == -1) return true;
  if (game[x + 1][y - 1] == -1 && game[x + 2][y - 2] == -1) return true;
  return false;
}
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  vector<pair<int, int> > possible;
  string str;
  int i = 2, j;
  while (cin >> str) {
    for (j = 0; j < 4; j++) {
      if (str[j] == '.') {
        game[i][j + 2] = 1;
        possible.push_back(make_pair(i, j + 2));
      } else if (str[j] == 'x')
        game[i][j + 2] = -1;
    }
    i++;
  }
  vector<pair<int, int> >::iterator vi;
  for (vi = possible.begin(); vi != possible.end(); vi++)
    if (check(vi->first, vi->second)) {
      cout << "YES";
      return 0;
    }
  cout << "NO";
  return 0;
}
