import strutils, sequtils when isMainModule: var a = stdin.readLine b = stdin.readLine for c in a: if c in 'a'..'z' or c in 'A'..'Z': echo "NG" quit() for c in b: if c in 'a'..'z' or c in 'A'..'Z': echo "NG" quit() if (a.len > 1 and a[0] == '0') or (b.len > 1 and b[0] == '0'): echo "NG" quit() if a.parseInt > 12345 or b.parseInt > 12345: echo "NG" quit() echo "OK"