int main(){ char i[5]; int n; n=read(0,i,5); if(n==5||i[0]==i[1]||i[1]==i[2])puts("YES");else puts("NO"); return 0; }