def n(s): return sum([x not in '0123456789' for x in s])>0 z=lambda x:x[0]=='0' a=input() b=input() print('ONKG'[n(a+b)|z(a)|z(b)::2])