(defun main (&rest argv) (declare (ignorable argv)) (let* ((a (read)) (b (read)) (xs (loop repeat a collect (read))) (d (reduce #'gcd xs)) (ys (loop repeat b collect (read)))) (dolist (y ys) (unless (zerop (mod y d)) (format t "No~%") (return-from main))) (format t "Yes~%"))) (main)