#include #include using namespace std; bool check(string S){ int num = 0; num = stoi(S); num = (int)log10((double)num) + 1; if(S.size() > num){ return false; } return true; } int main(void){ int i; string A,B; cin >> A >> B; if(check(A) == 1 && check(B) == 1){ cout << "OK\n"; }else{ cout << "NG\n"; } return 0; }