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