using System; using System.Linq; class No446 { static void Main() { var first = Console.ReadLine(); var IsFirst = first.All(x=>char.IsNumber(x))?Math.Log10(Convert.ToInt32(first)) + 1 == first.Count():false; var second = Console.ReadLine(); var IsSecond = second.All(x => char.IsNumber(x)) ? Math.Log10(Convert.ToInt32(second)) + 1 == second.Count() : false; Console.WriteLine(IsFirst && IsSecond ? "OK" : "NG"); } }