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