(defun factorize (n) (let ((p 3) (f '())) (let ((count 0)) (loop while (and (> n 0) (zerop (mod n 2))) do (incf count) (setf n (/ n 2))) (push (cons 2 count) f)) (loop while (<= (* p p) n) do (let ((count 0)) (loop while (zerop (mod n p)) do (incf count) (setf n (/ n p))) (when (> count 0) (push (cons p count) f))) (incf p 2)) (when (> n 1) (push (cons n 1) f)) (nreverse f))) (defun main (&rest argv) (declare (ignorable argv)) (let* ((n (read))) (format t "~a~%" (if (zerop (reduce (lambda (x y) (logxor x (cdr y))) (factorize n) :initial-value 0)) "Bob" "Alice")))) (main)