(defvar n) (defvar a) (defvar x) (defvar temp) (setq temp (read-from-string (concatenate 'string "(" (read-line) ")"))) (setq n (nth 0 temp)) (setq a (nth 1 temp)) (setq x (read-from-string (concatenate 'string "(" (read-line) ")"))) (defvar s) (setq s 0) (loop for i in x do (setq s (+ s i)) ) (format t "~a~%" (if (= (* a n) s) "YES" "NO"))