print grep(/[^\d\n]/|$_>12345,<>)?NG:OK