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