(let* ((n (read))) (let1 num (let loop ((i 2) (m n)) (cond ((< n (* i i)) 0) ((= (mod m i) 0) (+ 1 (loop i (div m i)))) (else (loop (+ i 1) m)))) (print (if (> num 2) "YES" "NO"))))