```
(princ "ENTER ANY NUMBER : ")
(setq n (read))
(setq flag 0)

(loop for i from 2 to n-1
    (if (=(mod n i)0)
        (setq flag 1)))

(if (= flag 0)
    (format t "~d IS A PRIME NUMBER"n)
    (format t "~d IS NOT A PRIME NUMBER"n))

```