(define yuki648 (let* ((n (read)) (k (round->exact (sqrt (* 2 n))))) (if (equal? (* 2 n) (* k (+ k 1))) (begin (display "YES") (newline) (write k)) (begin (display "NO") (newline)))))