implicit none
integer:: n, i, j, a, b, ans, t
integer,allocatable,dimension(:):: p

read(5,*) n
!read(5,*) n, a, b
!allocate(p(n))
!read(5,*) (p(i),i=1,n)

if (n == 7 .or. n == 5 .or. n == 3) then
    write(6, *) "YES"
else
    write(6, *) "NO"    
endif

end