using System; namespace yukicoder { class Program { static void Main(string[] args) { string x = Console.ReadLine(); string y = Console.ReadLine(); int A, B; if(int.TryParse(x,out A) && int.TryParse(y,out B)) { if((A <= 12345) && (B <= 12345)) { Console.WriteLine("{0}", "OK"); } else { Console.WriteLine("{0}", "NG"); } } else { Console.WriteLine("{0}", "NG"); } } } }