#include <bits/stdc++.h>
using namespace std;
char grid[5][5];
bool inRange(int x, int y) { return (x >= 0 && x < 4 && y >= 0 && y < 4); }
bool solve(int x, int y) {
  for (int i = -1; i <= 1; i++) {
    for (int j = -1; j <= 1; j++) {
      if (i == 0 && j == 0) continue;
      int xx = x + i, yy = y + j;
      int xx2 = x + 2 * i, yy2 = y + 2 * j;
      if (inRange(xx, yy) && inRange(xx2, yy2) && grid[xx][yy] == 'x' &&
          grid[xx2][yy2] == 'x') {
        return true;
      }
    }
    for (int j = -1; j <= 1; j++) {
      if (i == 0 && j == 0) continue;
      int xx = x + i, yy = y + j;
      int xx2 = x + -1 * i, yy2 = y + -1 * j;
      if (inRange(xx, yy) && inRange(xx2, yy2) && grid[xx][yy] == 'x' &&
          grid[xx2][yy2] == 'x') {
        return true;
      }
    }
  }
  return false;
}
bool canWin() {
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      if (grid[i][j] == '.') {
        if (solve(i, j)) return true;
      }
    }
  }
  return false;
}
int main() {
  for (int i = 0; i < 4; i++) {
    scanf("%s", grid[i]);
  }
  puts((canWin()) ? "YES" : "NO");
  return 0;
}
