package main import ( "fmt" "io" "os" "strconv" ) func main() { solver(os.Stdin, os.Stdout) } func solver(in io.Reader, out io.Writer) error { var A, B string fmt.Fscan(in, &A, &B) var ans = "OK" a, err := strconv.ParseInt(A, 10, 64) if err != nil { // log.Println(err) ans = "NG" } b, err := strconv.ParseInt(B, 10, 64) if err != nil { // log.Println(err) ans = "NG" } if a < 0 || a > 12345 || b < 0 || b > 12345 { ans = "NG" } // log.Println(ans) fmt.Fprintln(out, ans) return nil }