#include <bits/stdc++.h>
using namespace std;
char Map[5][5];
int main(void) {
  int a, b;
  bool flag = false;
  for (int i = 0; i < 4; i++) scanf("%s", Map[i]);
  for (int i = 0; i < 4; i++)
    for (int j = 0; j < 4; j++) {
      if (j + 2 < 4) {
        a = b = 0;
        for (int k = 0; k < 3; k++)
          if (Map[i][j + k] == '.')
            a++;
          else if (Map[i][j + k] == 'x')
            b++;
        if (a == 1 && b == 2) flag = true;
      }
      if (i + 2 < 4) {
        a = b = 0;
        for (int k = 0; k < 3; k++)
          if (Map[i + k][j] == '.')
            a++;
          else if (Map[i + k][j] == 'x')
            b++;
        if (a == 1 && b == 2) flag = true;
      }
      if (j + 2 < 4 && i + 2 < 4) {
        a = b = 0;
        for (int k = 0; k < 3; k++)
          if (Map[i + k][j + k] == '.')
            a++;
          else if (Map[i + k][j + k] == 'x')
            b++;
        if (a == 1 && b == 2) flag = true;
      }
      if (j - 2 >= 0 && i + 2 < 4) {
        a = b = 0;
        for (int k = 0; k < 3; k++)
          if (Map[i + k][j - k] == '.')
            a++;
          else if (Map[i + k][j - k] == 'x')
            b++;
        if (a == 1 && b == 2) flag = true;
      }
      if (flag) break;
    }
  if (flag)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
