#include using namespace std; int main(){ string A, B; cin >> A >> B; if((A[0] == '0' && A.size() != 1) || (B[0] == '0' && B.size() != 1)){ cout << "NG" << endl; return 0; } for(int i = 0; i < A.size(); i++){ if(A[i] < '0' || A[i] > '9'){ cout << "NG" << endl; return 0; } } for(int i = 0; i < B.size(); i++){ if(B[i] < '0' || B[i] > '9'){ cout << "NG" << endl; return 0; } } cout << "OK" << endl; }