open System let No446 () = let A = Console.ReadLine() let B = Console.ReadLine() let rec checkNum (S : String) (n : int) = if n = S.Length then true else if n = 0 && S.[n] = '0' && S.Length <> 1 then false else if S.[n] >= '0' && S.[n] <= '9' then checkNum S (n + 1) else false if checkNum A 0 && checkNum B 0 then let A = int <| A let B = int <| B if (A >= 0 && A <= 12345) && (B >= 0 && B <= 12345) then printfn "OK" else printfn "NG" else printfn "NG" () No446 ()