import sequtils, strutils let a, b = stdin.readLine var ans = "OK" for x in [a, b]: if x.toSeq.anyIt(it in Letters): ans = "NG" break if x != "0" and x[0] == '0': ans = "NG" break let n = x.parseInt if n > 12345 or n < 0: ans = "NG" break echo ans