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 printfn "OK" else printfn "NG" () No446 ()