using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { string[] AB = new string[2]; AB[0] = Console.ReadLine(); AB[1] = Console.ReadLine(); bool isOK = false; int chkNumeric = 0; foreach (string chkString in AB) { isOK = false; if (!int.TryParse(chkString, out chkNumeric)) { break; } if (1 < chkString.Length && chkString.Substring(0, 1) == "0") { break; } isOK = true; } Console.WriteLine(isOK ? "OK" : "NG"); } }