import strutils proc judge(Line: string): bool = if Line.len != 1 and Line[0] == '0': discard elif not Line.isDigit: discard elif Line.parseInt <= 12345: result = true let A, B = stdin.readLine echo if A.judge and B.judge: "OK" else: "NG"