(define (System.out.println x) (begin (display x) (newline) ) ) (define (calc sum n) (begin (display (- (/ sum 2) n)) (display " ") (display (- n (- (/ sum 2) n))) (newline) ) ) (let ( (N (read)) ) (let loop((foo (read)) (Sum 0)) (if (eof-object? foo) (calc Sum N) (loop (read) (+ Sum foo)) ) ) )