   program abc158a
   implicit none
   character(3)::a
   integer::check

      read *,a
      if (a(1:1)==a(2:2).and.a(2:2)==a(3:3).and.a(3:3)==a(1:1)) then
         check=0
      else
         check=1
      end if

      if (check==0) then
         print *,'No'
      else
         print *,'Yes'
      end if
      stop
   end program abc158a