#include <bits/stdc++.h>
const int go[4][2] = {0, 1, 1, 0, 1, 1, 1, -1};
char s[55][55];
bool chk() {
  for (int i = 0; i < 4; i++)
    for (int j = 0; j < 4; j++) {
      bool ok[4];
      for (int tp = 0; tp < 4; tp++) ok[tp] = true;
      for (int k = 0; k < 3; k++)
        for (int tp = 0; tp < 4; tp++) {
          int x = i + go[tp][0] * k, y = j + go[tp][1] * k;
          if (x < 0 || x > 3 || y < 0 || y > 3 || s[x][y] != 'x')
            ok[tp] = false;
        }
      for (int tp = 0; tp < 4; tp++)
        if (ok[tp]) return true;
    }
  return false;
}
int main() {
  for (int i = 0; i < 4; i++) scanf("%s", s[i]);
  for (int i = 0; i < 4; i++)
    for (int j = 0; j < 4; j++)
      if (s[i][j] == '.') {
        s[i][j] = 'x';
        if (chk()) {
          printf("YES\n");
          return 0;
        }
        s[i][j] = '.';
      }
  printf("NO\n");
  return 0;
}
