(define yuki607 (let* ( (input (read-line)) (n-m (map string->number (string-split input " "))) (n (car n-m)) (m (cadr n-m)) (r (make-vector n 0)) (flag 0) ) (define (process-line line) (let* ( (a (map string->number (string-split line " "))) (d (list 0)) (c 0) ) (for-each (lambda (i) (vector-set! r i (+ (vector-ref r i) (list-ref a i))) (set! c (+ c (vector-ref r i))) (when (member (- c 777) d) (set! flag 1)) (set! d (cons c d))) (iota n) ))) (for-each (lambda (_) (process-line (read-line))) (iota m)) (if (= flag 1) (display "YES\n") (display "NO\n"))))