#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define N 1000 #define MOD 1000000007 #define pe(str) return cout<<(str)<>a>>b; if((a.size()!=1&&a[0]=='0')||(b.size()!=1&&b[0]=='0'))pe("NG"); re(i,a.size()) if(!bw('0',a[i],'9'))pe("NG"); re(i,b.size()) if(!bw('0',b[i],'9'))pe("NG"); if(atoi(a.c_str())<=12345&&atoi(b.c_str())<=12345)pe("OK"); else pe("NG"); return 0; }