(define (System.out.println x) (begin (display x) (newline) ) ) (define N (read)) (define a (make-vector N)) (define b (make-vector 101)) (let loop( (i 0) ) (if (< i N) (begin (vector-set! a i (read)) (loop (+ i 1)) ) (let loop2( (j 0) (Max 0) (foo (read)) ) (if (< j N) (begin (vector-set! b foo (+ (vector-ref a j) (vector-ref b foo))) (if (> (vector-ref b foo) Max) (loop2 (+ j 1) foo (read)) (loop2 (+ j 1) Max (read)) ) ) (if (or (= Max 0) (= (vector-ref b 0) (vector-ref b Max))) (System.out.println "YES") (System.out.println "NO") ) ) ) ) )