(letrec* ((a (string->number (read-line))) (n (map string->number (string-split (read-line) " "))) (mm (lambda (n m) (if (= (length n) 1) (list m (car n)) (let1 m1 (- (cadr n) (car n)) (if (null? m) (mm (cdr n) m1) (mm (cdr n) (min m1 m)))))))) (let1 r (mm n '()) (begin (print (car r)) (print (- (cadr r) (car n))))))