(defun main (&rest argv) (declare (ignorable argv)) (let* ((w (read)) (h (read)) (n (read)) (s (make-hash-table)) (k (make-hash-table))) (dotimes (i n) (let* ((a (read)) (b (read))) (setf (gethash a s) t) (setf (gethash b k) t))) (let* ((cnt-s (hash-table-count s)) (cnt-k (hash-table-count k)) (res (- (+ (* cnt-s h) (* cnt-k w)) (* cnt-s cnt-k) n))) (format t "~d~%" res)))) (main)