program seven_five_three
  implicit none
  integer :: x
  read(*,*) x
  if ( (x-7)*(x-5)*(x-3) .eq. 0) then
     write(*,'(a)') 'YES'
  else
     write(*,'(a)') 'NO'
  end if
end program seven_five_three