program y969 implicit none integer(8)::X read*,X if(mod(X,3)==0)print*,"Yes" if(mod(X,3)/=0)print*,"No" end program y969