#include using namespace std; typedef long long ll; int main(void) { string a,b; cin >> a; cin >> b; if (a == to_string(stoi('0'+a)) && b == to_string(stoi('0'+b))) cout << "OK" << endl; else cout << "NG" << endl; return 0; }