(define (slist->string slst) (string-join (map symbol->string slst) " ")) (define N (read)) (define s2 (lambda (n) (if (<= n 1) (if (= n 1) #t #f) (s2 (/ n 2))))) (define (list-of-sum n a) (if (= a 0) '() (cons (list a (- n a)) (list-of-sum n (- a 1))))) (define (last_element l) (cond ((null? (cdr l)) (car l)) (else (last_element (cdr l))))) (let ((ans (filter (lambda (n) (and (not (s2 (list-ref n 0))) (not (s2 (list-ref n 1))))) (list-of-sum N (- N 1))))) (display (if (= 0 (length ans)) "-1\n" (format "~a ~a\n" (list-ref (last_element ans) 0) (list-ref (last_element ans) 1)) )))