#include using namespace std; bool Alp(string s){ bool ret=false; for(int i=0; i1); } int main(){ string A, B; cin>> A>> B; if(Alp(A)||Alp(B)){ cout<< "NG"<< endl; return 0; } if(Zero(A)||Zero(B)){ cout<< "NG"<< endl; return 0; } if(stoi(A)<=12345&&stoi(B)<=12345){ cout<< "OK"<< endl; }else{ cout<< "NO"<< endl; } return 0; }