(define (main args) (let* ([n (read)] [m (read)]) (print (cond [(>= m n) 1] [(and (even? n) (>= m (quotient n 2))) 2] [else -1]))) 0)