#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 < 5; i++){ if(A[i] < '0' || A[i] > '9' || B[i] < '0' || B[i] > '9'){ cout << "NG" << endl; return 0; } } cout << "OK" << endl; }