using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace YukiCoder { class Program { static bool IsNum(string S) { if (S.Any(c => c < '0' || c > '9')) return false; if (S.Length == 1) return true; if (S[0] == '0') return false; return true; } static void Main(string[] args) { string a = Console.ReadLine(); string b = Console.ReadLine(); string S = (IsNum(a) && IsNum(b)) ? "OK" : "NG"; Console.WriteLine(S); Console.ReadLine(); } } }