(defun maxmin(lst / x n a b c d)
(setq x (car lst)
a (car x)
b (cadr x)
c (car x)
d (cadr x)
n 1
)
(repeat (max (- (length lst) 1) 0)
(setq x (nth n lst)
a (min a (car x))
b (min b (cadr x))
c (max c (car x))
d (max d (cadr x))
)
(setq n (1+ n))
)
(list (list a b) (list c d))
)