#include using namespace std; using ll = long long; #define FOR(i,a,b) for(ll i=(a);i<(b);++i) #define ALL(v) (v).begin(), (v).end() #define p(s) cout<<(s)<1 && s[0]=='0') return false; return true; } int main(){ cin.tie(0); ios::sync_with_stdio(false); // input string s, t; cin >> s >> t; if(check(s) && check(t)){ p("OK"); }else{ p("NG"); } return 0; }