#include <cstdlib>
#include <iostream>
using namespace std;
int main(){
string ans = "NO";
int a[10];
for (int i = 0; i < 10; i++){
a[i] = rand() % 4 + 1;
cout << a[i] << " ";
}
for (int i = 0; i < 9; i++){
if (a[i] == a[i+1]){
ans = "YES";
break;
}
}
cout << endl << ans;
return 0;
}