program main
 implicit none
 character(len=3) S
 integer :: bus=0

 read *, S

 if ( S(1:1) /= S(2:2) ) bus=1
 if ( S(1:1) /= S(3:3) ) bus=1
 if ( S(2:2) /= S(3:3) ) bus=1

 if (bus==0) print '(A)','No'
 if (bus==1) print '(A)','Yes'

endprogram main
