#include #include #include using namespace std; int main(void){ // Here your code ! string a,b; cin >> a >> b; try{ stoi(a,nullptr,10); stoi(b,nullptr,10); if( a[0] == '0' && a.size() != 1){ if( b[0] == '0' && b.size() != 1){ cout << "NG" << endl; }else{ cout << "OK" << endl; } }else{ cout << "OK" << endl; } }catch(const std::logic_error& e){ cout << "NG" << endl; } }