(defun main (&rest argv) (declare (ignorable argv)) (let* ((n (* 2 (read))) (m (isqrt n))) (if (= n (* m (1+ m))) (format t "YES~%~d~%" m) (format t "NO~%")))) (main)